Questions about this
Why does buying lose in the first few years?
Because the costs of getting in and out are front-loaded. Commission, the transfer tax, attorney fees and the interest-heavy early years of an amortising loan all land before much equity has built. Three years is rarely long enough. Five to seven usually is, and that is what the crossover year in this tool is showing you.
Does this account for the mortgage interest deduction?
No, deliberately. Since the 2017 standard deduction rose, most households take the standard deduction and get no separate benefit from mortgage interest. Including it by default would flatter buying for people who will never claim it. If you do itemise, your real crossover comes sooner than this shows.