A sale does not cancel the lease. The buyer steps into the landlord's place: the buyer can enforce the lease, and the tenant keeps the lease's protections against the buyer. Selling by itself does not make the tenant move out. Ending a tenancy still depends on the lease and Virginia's notice rules.
The landlord must tell the tenant about the sale and give the buyer's name, address, and a phone number. This is part of the handoff; the sale does not erase the tenant's rights under the lease.
When ownership transfers, the seller must hand the tenants' security deposits, plus any interest earned on them, to the buyer. If a property manager holds the deposits, the owner must ask for them in writing before closing, and the manager must tell each tenant the deposit went to the new owner. The new owner must return any deposit owed when the tenancy ends, even if the deposit was not passed along.
We can talk through the lease and occupancy while you consider the sale; you do not have to settle a move-out question before contacting us.
Official sources: Va. Code §55.1-1606 · §55.1-1607 · §55.1-1201 · §55.1-1213 · §55.1-1216 · §55.1-1226 · §55.1-1253.