Family home iht allowance if she goes into a home

If mil moves into a care home or lives with us as carers what happens when she dies re the new family home iht allowance? Her flat is not going to be sold to pay for her care as she has enough investments to pay for several years. So if she still owns it but is not living in it can we still claim the 175k allowance against IHT or will it no longer count as the family home? Do we have to leave it empty to avoid inheriting it as a rental property? Apart from not wanting her lifetime of hard work and savings to be pinched by HMRC my brother in law has mental health issues and physical disability so it is important to maximise the inheritance. 40% of 175k is a lot of tax to pay.

You need to speak to an accountant.