But the interest rates don't keep going up and up.
It's not the actually $ it erodes, it increases your REAL money (i.e what it can buy).
Eg you buy a unit worth $200K. You borrow $180K. Inflation causes your property to double so it's worth $400K. Now your $180K debt would only buy half...