There are heat pump water heaters (I have one; AO Smith HPTU-50N). More expensive up front vs tankless but a lot more efficient.
Keeping a big reservoir warm for the sake of keeping it warm only becomes efficient with regular usage.
From a cost perspective, the slight efficiency increase of tankless never pays back over the cost of the unit, and unfortunately, usually the more frequent repairs. The big benefit is the 'unlimited' hot water.