the element won't last but a few seconds with no water. when i bought mine, it had been in a show and would not work on electric. turned out the element was burnt. seems like the element was less than $15, tool maybe another $5. dealer supplied the replacement and i purchased a spare.
if the gas comes on then goes out, my thoughts would be that it had no water and a high temp switch shut it off.
when they winterize them, they block the water to the heater and bypass it. the outlet has no valve but there is a check valve in it. most also drain the water heater (mine, i pulled the anode rod and held the relief valve open).