The OpenRent AST covers this in the "Uninhabitability" clause. You can find a sample version of the contract here.
What exactly happens if the property becomes inhabitable for any reason will depend on the specific circumstances, such as whether the situation is the fault of either party.
Many (though not all) landlord insurance policies will also include conditions relating to these events. It is always really important to make sure that you have a comprehensive buildings policy in place, and it is worth checking what provisions your policy has in place for this scenario.
In the event of a claim or dispute related to an event of this sort, if you wish to make a financial claim against the tenant for damages, our legal partners may be able to assist.