No that's not how it works in the typical case. Lenders set their interest rates based on expected future inflation rates over the term of the loan. Debts only really get eroded when interest rates are fixed and actual inflation greatly outpaces expected inflation. Like in the hyper inflation that occurred in Zimbabwe, Venezuela, Serbia, etc.