Tax treatment of property rental losses
It's important to realise that all properties let by a landlord are treated as a single rental business.
Therefore if the rental expenses exceed that years rental income the excess costs are simply carried forward for offset against future rental income. If this position arises for a number of tax years the rental losses that are carried forward can easily mount up. (Note there is a provision to allow any loss attributable to capital allowances for offset against the landlords other income or gains - but this is very unusual in practice).
When a rental property is sold if the landlord has other rental properties that he still owns and lets, the disposal will be treated as a part of his rental business. Any rental losses still remain with the rental business and can therefore be offset against rental profits that arise on the other properties (even if the rental income arises from properties that are bought after the disposal).
This carry forward of the rental losses arises providing the rental business still continues. If the rental business ceased then the losses would cease with it. They'd then be lost forever.
It would only be if any cessation was only a temporary break in the rental business (so it couldn't be regarded ceasing) that the losses wouldn't be lost.