Which lease survives matters more than whether one does. A fixed-term lease runs to its end date regardless of who owns the building, so a buyer who wants the unit empty at possession needs to time the purchase around that date, not around the sale itself.
A periodic, month-to-month tenancy carries over too, and ending it still requires the same written notice a landlord would owe under any other circumstance. A buyer who assumes an empty house just because the sale closed can find themselves with a tenant who has every right to stay.
This is exactly the kind of detail that changes how a property should be priced and marketed, since a house sold with a sitting tenant appeals to a different buyer than one sold vacant. A lawyer handling the sale, typically for $800 to $1,500 in fees, will confirm exactly what notice the tenant is owed before the deal closes. Get your hand-reviewed valuation from Joel Dyck.