Can you post the model number of your water heater and the rev number?
Do you get a DSI fault on the inside panel when on gas?
A 2002 Atwood heater would have a separate T stat for the electric and the gas burner side. It may be that the gas side T stat is not working correctly. Opens up too soon.
Does the gas burner shut off or run constantly, just the water does not get hot as the electric side does?
How long did the gas burner run from an overnight cool down of the water heater? 20 minutes, 40 minutes, etc
Another thing, on a 2002 Atwood with both gas and electric, the electric side and the gas side both have their own ECO (emergency cut-off) switch. The ECO is supposed to open up in the 180 F range. The gas T stat is supposed to open at 140 F range, and if the gas ECO opens up lower than 140 F as it has a problem, then the water will not get to temp as it is overriding the gas T stat.
Need more info to go on.
2005 Ford F350 Super Duty, 4x4; 6.8L V10 with 4.10 RA, 21,000 GCWR, 11,000 GVWR, upgraded 2 1/2" Towbeast Receiver. Hitched with a 1,700# Reese HP WD, HP Dual Cam to a 2004 Sunline Solaris T310R travel trailer.