Your repair on property increases property value/equity
yes, it may be nagative cashflow for the year, but your equity growth worths a lot more.
So it is not a "loss" per se, it is an investment for equity gain and for increase in future cashflow (as you can now charge a higher rent).