The tenant is protected by the common law "huur-gaat-voor-koop." If the property is sold, the new owner becomes the landlord and all the terms of the existing lease are enforceable.
The owner cannot cancel the lease, but must wait until the end of your existing lease period. The new owner is also responsible to refund your deposit less any claim for damage.
There are some exceptions: