Second, buying and selling does not break the lease. The fact that you have entered into a lease with the real estate (with a receipt, which has not expired) means that the real estate cannot be sold without asking your opinion. At least you have the preemptive right, and the real estate can be resold to others only after giving up the preemptive right (written statement).
So you can give priority to buying or renting until the lease expires. Even if you go to court, you have a good chance of winning.