Yes, but it would have been a bigger and more expensive headache.
I've had a tankless for coming up on 18 or so years. If I had to do it again, and I likely will soon, I'm going back to a tank heater. It has been flawless for all those years, I just think the buy in is not worth it. It also doesn't do well with my washing machine when it's pulling hot water for short periods of time, like on off on off to pul small amounts of water. That kind of thing can be rough on tankless heaters.
But back to your OP, suck it up buttercup
If you had a tank water heater, it wouldn't have lasted 18 years, and you'd be close to installing your second one more than likely. That makes the buy in worth it. 20-25 years is normal for tankless systems. Mine has a recirc pump so it doesn't cycle that much when it's in use.