Hello and thanks for using Just Answer.
I am Al and am happy to assist you with your enquiry.
The Tenancy Agreement is binding between you and the Landlord (and any new owner of the property).
Therefore, unless there is a break clause, you are unable to end it before the end of the fixed term and nor can your Landlord. Likewise, if your Landlord sells before the Tenancy agreement has finished, the new owner is not entitled to end the Tenancy just because he wants to- he has to honour the Agreement with you.
A lot of investors like to buy a property which has a Tenant in place, as it means they don't have the hassle of finding one themselves.
I hope this assists and sets out the legal position.