This is just a back-of-the-napkin comparison, with many flaws. You need to look at more comprehensive studies. And this article only follows the cars for three years. A three year comparison front-loads the upfront cost, which is typically higher for an EV.
When you go beyond three years, the gas car cost keeps climbing in comparison to the EV.
Gas cars depreciate faster than electric. So the longer you own it, the more it tilts in favor of the EV.
Gas cars tend to start breaking down more later in life. So the longer you own it, the more it tilts in favor of the EV.
With a longer time horizon, the difference in gas versus electricity continues to build and build. So the longer you own it, the more it tilts in favor of the EV.
Lastly, the comparison uses models that have both a gas and electric version. This is a terrible way to compare because these models were built as gas-powered then retrofitted to electric. A car that is designed to be an EV from the start will be a lot more efficient and trouble-free.