[edit] I'm not an expert but explained why I wouldn't do that personally in a peer to your reply.
We are both well aware that there is no risk-free investment. Governments bonds that are considered less risky that ETFs usually return 1-2% per year.
The ETF I'm talking about maps a market index covering a big chunk of the US market or several stable international markets. They are still a risk, your house is also an asset and is also a risk. I think if you only have your mortgage as an asset then probably buying some ETFs would help diversify your assets. But if you already have a lot ETFs then maybe would be better to finish up earlier the mortgage...
[1] https://www.treasurydirect.gov/indiv/products/prod_ibonds_gl...
Your mortgage is a liability, not an asset.
It's a calendar spread. Last year, you were buying 2021 dollars for a fixed rate (2.675% APR in my case), but you different vintage dollars over time. You owe 2022 dollars in 2022, and 2031 dollars in 2031. A 2051 dollar is almost certainly going to be worth significantly less than a 2021 dollar.
So you're buying 1 2021 vintage USD, but at the extreme, you're paying it back with 2.2 2050 dollars. If we expect inflation to be an average of say, 3% over that period, each 2021 vintage USD should be worth at least 2.42 2021 vintage dollars. So in this example, you're earning real dollars over this period.