appliance repairman here?

Mine was doing the same thing. It ended up being the igniter which also acts as a kind of termocouple that controls the voltage to the safety valve. Basically wasn’t allowing enough current to the safety valve for it to open. I also replaced the temp sensor and all’s been good, had it apart so figured replace both parts. Ran about $30. Look up your model on line and get the replacement part numbers and do a web search. By the way the igniter was glowing and lighting fine.