Home interest vs appreciation rate

If the current interest rate on a mortgage is 7% and the average long term appreciation rate of residential real estate is 3-5% (source: https://www.statista.com/statistics/275159/freddie-mac-house-price-index-from-2009/).

Wouldn’t that mean that at today’s current interest rate, your actually losing 2-4% a year on a house for the length of the mortgage? Adding in maintenance, taxes, and insurance, maybe losing 3-5%?

Please, don’t respond with “well rent is throwing money away.” Please actually address my question and the math within it.