I'm not sure we are considering inflation in a way that is applicable to retirement. Inflation usually implies an increase in both wages and expenses.
For working people, over long periods of time, living standards hold about steady because their increase in wages equals their increase in spending. For example, maybe both increase 20% over 5 years and nothing changes in terms of purchasing power.
Now consider a retiree living off of savings/investments. If expenses increase 20%, they do not have a job so they do not get the higher wages that come with inflation. Also, their investments do not yield more just because everything now costs more. Bond yields do not rise (except for TIPS) and stocks do not neccessarily go up or pay higher dividends.
Retired homeowners with paid-off mortgages experience the same increase in living expenses as retirees with mortgages. That's because the mortgage payment never changes. The increase in expenses comes from food, medical, insurance transportation, utilities, etc. not the mortgage payment. So if the retiree with a paid-off house has $0 in mortgage expenses and $40k in all other expenses, his or her increase in living expenses due to inflation are the same as the retiree who pays $10k in mortgage P&I and $40k in all other expenses. Our hypothetical 20% inflation would increase the total cost of living for both by $8k.
Of course, the mortgage-free retiree pays less in interest, and the mortgaged retiree has more cash earning a return. Will the mortgaged retiree's assets generate a return higher than the mortgage interest rate? This is unknown. The US stock market has done great historically, but that does not guarantee its future performance. So the decision boils down to a market prediction about future long term total returns exceeding the mortgage rate.
That doesn't always happen.
The average annual return with dividends reinvested since 1990 was only 0.604% for the Nikkei 225. The winner in that scenario was pay off the mortgage.
https://dqydj.com/nikkei-return-calculator-dividend-reinvestment/