The tenancy survives the sale
In Ontario a residential tenancy attaches to the property, not to the landlord. When you sell, the buyer steps into your shoes on closing: the lease, whether written, oral or a fixed term that has rolled into month to month, continues on the same terms, the rent stays where it is, and the buyer becomes the landlord for every purpose under the Residential Tenancies Act. A fixed-term lease does not end on its last day; the tenant simply continues month to month unless they give notice or sign an agreement to leave. The last month's rent deposit you collected is credited to the buyer on the statement of adjustments, with the interest the Act required you to pay each year, and the buyer takes over the obligation to apply it to the tenant's final month. Rent increases follow the tenant, too. A unit first occupied for residential purposes before November 15, 2018 is subject to the annual guideline; a unit first occupied after that date is exempt from the guideline, though the once-a-year timing and the ninety-day written notice still apply. Buyers, and above all their lawyers, will ask for the lease, a rent ledger, the deposit history and any notices served, so assemble that file before listing.