I agree. If she sells her share to him, real estate transfer tax is due. If she gifts her share to him, gift tax is due. AFAIK, it can be contractually agreed who pays what.
The tax debtor for the real estate transfer tax is generally the
buyer (=purchaser).
Of course, the seller can grant the buyer a sum x as a concession. But since this is a side agreement, it must be included in the notarized purchase contract.
If x happens to correspond to the real estate transfer tax...
Real estate transfer tax can be avoided in the case of a gift. However, if the gift is not a genuine gift (I assume your ex-partner won't simply want to gift you half the house) but a gift under the condition that you take over the loan, then gift tax is due. That will definitely cost you more.
For expensive properties, a company is usually founded, which pays the real estate transfer tax once upon acquisition.
Afterwards, the property itself is no longer transferred, but 95% of the company that owns the property.
This is how the big players in Germany save millions (as recently again at Potsdamer Platz..), but the small farmer or homeowner is burdened.