The optimal design for a heavily renewable grid is solar water heating a tank in home whenever the sun shines, falling back on a heat pump water heater with a tank.
Regardless the point is eliminating the use of natural gas in heating water is itself a benefit.
Summary the more hot water you use the smaller the win is for tankless.
Other thing I've read and seems true is gas and heat pump water heaters cost about the same to run. I installed a heat pump unit five years ago. Works okay for two people. If you had three teenage girls and a wife that likes baths a tankless would be a better choice.