Do the exercise on a spreadsheet. One row per year to make things simple.
Make 3 columns, "mortgage paid," "investment", "no-mortgage". Pretend the house is $100k. With the mortgage you get to keep that money and invest it, so first row in "investment:" should be $100k. Put $0 in the "no-mortgage" column, put $-421 * 12 in the "mortgage paid" column. I got that number from a mortgage calculator, assuming $100k loan and 3% interest over 30 years.
Then in row 2, "mortgage paid" cell should be previous cell - $421 * 12. You will keep paying this for 30 years.
"investment cell" should be previous cell * 1.05. We assume the investment return is 5% over long term.
The no-mortgage column stays 0. You spent the $100k to pay for the house, so it's gone right off the bat.
Repeat this for 30 rows (years). Then at the end look at the difference between investment vs. mortgage paid columns.
And then get back to me and tell me if you still think that is a "smaller total return" :-)