Once the property is sold, your obligation is only to the NEW owner, not the previous one.
You should also receive a notice about who is the new owner
First, do you have a lease that is still in force? If so, the new owners should respect that lease.
If the new owners wants to occupy the property themselves, they should give you the proper notice and/or you can ask for them to buy out the rest of your lease. Perhaps you can come to a mutual agreement on what it will take for them to have you move. This is typical of "cash for keys"