Only if the debt is not pegged to inflation
In Chile at least, you can get a loan in “UF”, which is an inflation-adjusted equivalent of the underlying currency. The value of UF changes with inflation (almost always going up). So the loan will just keep getting more expensive
Most mortgages there are in UF