When a property is vacant due to a fire from a tenant, can i still deduct my expenses in the duration of repairs while receiving rent loss income?

We rented out our property in August 2022. 
The tenant lived there for a month and burned the house down. 
between lease date to lease termination is 56 days. (we did get rent for 2 months from the tenant)

For the rest of the year (Oct, Nov and Dec) we received rent loss income from our insurance.

I know that rent loss income from insurance are taxable, so I treated it like a normal income.

However when asked how many days the property was rented.. is it 2 months (lease date commence till termination) or 5 months (including the rent loss income duration).

If i had recorded rental income for 5 months, and only record expenses for 2 months, it's not apple to apple. 

Is there any IRS Code on these?