Question: A man sold a waqf jarbah; after some time he regretted it and wished to be rid of what he had done. The jarbah is now in the hand of a man who has built upon it and is unwilling to return it for little or much. What should this man, who wants to free himself from this deed, do?
Answer—and Allah is the One who grants success: In such a case the man who squandered the waqf and sold it must pay its value today to the beneficiaries; “Allah does not charge a soul except [with that within] its capacity.” [Al-Baqarah:286].
We have said this on the basis of what the jurists of the madhhab have said: that building on land or planting it is juridical consumption; and when a thing is consumed, it is guaranteed by its value if it is a non-fungible, and by its like if it is a fungible. And what we have mentioned is the madhhab, as in al-Azhar and its Commentary; for it says therein that where redemption is impossible, the seller must pay its value and hand it to the beneficiaries, or purchase something with it and make it a waqf in place of the original waqf.
Source: Min Thimār al-ʿIlm wa al-Ḥikmah vol.2