Been debating myself about that since my rental is at a point where I should be thinking of replacing it, and I want to break out of the contract and just own my own tank instead, otherwise I could call them and get a "free" one but then I keep having to pay per month. If you go tankless you may as well go with the dual pipe condensing type. closed loop combustion so it's not sucking your warm house air outside. It will be the most efficient. They are not exactly cheap though. For a professional installation you're looking at around 5 grand. If you buy it and install yourself maybe like 2 grand, but may still need to get a licensed pipe fitter to do the gas so that might be another grand (I got quoted like 2 but this really depends on the particular install).
Question to ask yourself is how long until the higher efficiency makes up for the extra cost and if it's worth it. They are also more complex so more likely to fail at some point while a simpler tank unit can last for a decade or more.
On the other extreme I'm even toying with just going with an old school electric tank instead. Kinda one extreme to the other. They are cheap and also don't involve any venting so nothing stops me from insulating the crap out of it so heat retention will be better for both the tank and the house too as no vents going outside. Vents essentially mean lot of your house's heat is lost since it's not like there's a damper that closes, especially with the old style tanks with pilot light.
I'm kind of leaning towards electric myself as it will be something super easy to install and technically 100% efficient. I could even get fancy by setting up scheduling so it does not continue keeping the water hot when I don't need it. But I heard of that being bad due to pathogens being able to build in it, so something I would need to look up more. Need 4 breaker spaces for those too so I'd have lot of cleaning up to do in my panel to free up that many spaces.
The thing to remember with tankless is if it's undersized it may not be able to heat the water hot enough especially in winter. With a tank, an undersized (BTU wise) unit just takes longer to heat the water but it eventually reaches the right temp.