New Roof on Rental Home

I sold my home in May 2021 that I rented out the last 3 years.  In March 2021 I replaced the roof for $6200 due to damage not covered by insurance.  Can I deduct that as an expense since I cannot depreciate it due to the sale of the home?  Or is that amount just included in the adjusted gross from the sale?