My daughter's Atwood heater had the same problem. Dealer never really "fixed" it. Remove both thermostats. Clean the thermostat face and where it contacts the tank with a Scotch Brite and spray with brake cleaner before reassembling. Use a 12V test lamp to be sure that both thermostats are closed AND that both gas valves have 12V when the igniter comes on.
Most TT gave a switch/light to show proper or improper (lockout) operation mounted near the sink. Her's still locks out on occasion but they ignore it until they want hot water. Gas heats 6 gallons pretty quick !