I just don't buy that. Most people who do that seem to ignore the heavy costs of owning a house in the meantime: taxes, repairs, maintenance, insurance, commissions, upgrades, lawn care, pest control, utilities, alarm systems, etc.
I've serially owned houses over the decades. Sometimes I'll look at what I sold them for, when, and compare with their current zillow value. The return on every one is less than if I'd invested the money in the stock market, and that's NOT counting all those major ongoing costs I listed. It's just on the price.