According to Geotab a Tesla will be at 90% of it's initial State of Health (SoH) after 5 years of use while a Leaf (which is well-known for shit thermal management and poor battery quality) will be at 80%. That's worse than their other charts which show averages of 85% SoH in an equivalent amount of time.
Regardless, even operating at 80% after five years is completely fine. The curve isn't really linear anyway so after about 10 years the batteries will likely be operating at about 70% of their original SoH in the worst case scenario.
Also consider that the price of lithium ion batteries has dropped consistently year over year for the past decade. There was a bit of a hiccup because of COVID but that's over now and the price is continuing to drop. That means the cost of a replacement battery pack in 10 years will likely be 60-90% cheaper (if the current trend continues) than it is today.