Investors try to price it that way, but the effect on borrowers, long term, is quite beneficial. If you bought a house 20 years ago on a 30 year note, the payment today is very likely a much, much smaller % of income than it was back then... and you'd also have a store of value in equity. That's true if you didn't pay too much at the time, even if income lags inflation, because housing was easily the biggest single expense at the time of purchase. If housing was 30% of income at the time, it's less today under that scenario if other factors remain equal.
That's not true in a zero inflation scenario, and exactly the opposite holds in a deflationary scenario, where the more you pay the more you owe in terms of value.
Taking that from Macro to Micro economics explains why the housing bubble has been so destructive of middle class fortunes, and will continue to be so for a long time to come. It also explains why that bubble was so dangerous, and why the extraordinary actions of the FRB & Treasury prevented the whole economy from following housing right down the rathole of a deflationary spiral.