A few things:
1) You've cherry-picked the hottest RE market (well, next to Vancouver) in one of the highest growth periods in Canadian RE history with the benefit of hindsight. There's a saying in investing: "Past performance is not an indicator of future returns". If you buy a house in Toronto in 2020, it may stay stagnant or even decline in value, despite what's happened between 2000-2020.
2) In your calculations, you've missed the 20% down payment that the renter would have invested. 20% of $245K = 49K, which 7% compounded over 20 years is $190K, after cap gains tax is probably $160-$170K net, depending on your tax bracket
3) As per cherry-picking the RE location and the time period, if you're going to do that for RE instead of using national historical averages, then you must do that for your stock picks as well. So instead of investing the 20% downpayment of 49K in an S&P ETF, say the renter bought Apple stock instead in 2000. The renter's $49K would be worth close to $10MM today! Far outstripping the RE returns in the Toronto market over the last 20 years.
It's an interesting thought experiment to play "What If?" but nobody has a crystal ball. All we can do is rely on aggregate averages, otherwise we'll all be cherry-picking the best data to prove our points.