Hail storm with roof damage during 'lease back' period after house sale.

Very complicated situation here. (Asking for a friend / house buyer)
Person purchased a home in early March 2021.
"Lease back" for a month was part of the contract. (So Seller stayed on after closing date as a tenant).

After the lease back period the buyer would make the house their residence (in April 2021).

"Lease back" rent was $0 as part of contract.

There was a hail storm in March during the "lease back" period.

The roof was totaled out because of the storm. The insurance company will pay to have the roof replaced.

Can the person (buyer) deduct the cost of the insurance deductible ($2,500) on tax form?
If so, which year should deduction be made? The year the storm happened (2021) or the year the roof replacement happens (2022). (Has not happened yet).

Thank you.