We had a similar but opposite incident here a few years back.
A man owned a unimproved lot and a company cleared the lot and built a house on it. It was supposed to have been built on the lot next door to it.
After the home was finished, the actual owner of the lot tried to take possession of the new home.
Of course it wound up in court.
IIRC, the judge ruled that the owner of the lot did discover the mistake early enough to have stopped the building of the new home, but declined to do so, thinking he could get the new home essentially for free.
The judge ruled in the builder’s favor and made them trade the lots.................
I had a legally savy neighbor years ago, who had a legally stupid couple who intially were friends of hers. The smaet neighbor had a multilot property that allowed her to have another unit built attahed to one end of her house, and she allowed her friends to build and pay for building such a unit.
After quite few years the friendship deteriorated and the couple wanted/decided to sell their residence, built attached to my neigbor’s house.
The dummies did not read their contract that allowed them to build their place. It only made them owners or the edifice, not the land under it. They could “move” the edifice with proper care for detaching it from my neighbor’s house and would be liable for any problems that resulted from such a move.
They wound up abadnoning the unit (they could never find a buyer willing to assume the contract with my neighbor), with my neighbor getting posession of it for nothing, and giving her a rental unit.