Net income = rent - expenses
If it’s not rented out you can still deduct the expense, and if negative you might be able to carry the loss forward.
But it's crappy because you have no rent to make up for the expense, so you're still losing money, just less than the full rent.
It's not like it's some magic trick or some perk landlord's get that magically gives them free money.