I think you have either misunderstood the HMRC advice or been given bad advice by them, (not uncommon).
HMRC Manual PIM2510: if the business only consisted of letting a single house, it would cease when the tenant left and the customer began to use the house as a private residence or, alternatively, when they decided the house wouldn’t be re-let
Technically I haven’t decided that the house wouldn’t be relet, but a sale fell through and I am waiting for another sale offer to now go through. Would that exempt me?
If you advertised it for sale; it didnt sell and you subsequently re-let, then you could claim for the costs during the whole period. However if you dont re-let it, your entitlement to tax relief on costs ends when the last tenant moves out .