Whirlpool oven gas shuts off one second after turning on
Have you considered looking at the control board and the computer system behind it? Based on what I have read and seen from what you posted, that may be the issue. I don't know for certain but it sounds like a short circuit in that area. It may have occurred if you have kids. They perhaps may have repeatedly flipped a breaker in the breaker box or it may have occurred during a power outage. It is a $243 part though, and you might want to do more research on that specifically before purchasing this part. I will post a link here if you want to look at that information I read (mainly specs on the part). https://www.searspartsdirect.com/product/1vx34izmuz-0022-664/id-w10349742
Have a good day!

New correction: I asked someone who had more experience, and he suggested that you unplug and re-plug the stove many times before considering what I suggested. Electronic systems often will exhibit symptoms such as you explained if their system is fried by a surge. For example: due to several unexpected power outages and resulting surges, our printer started to glitch, our laminator died, an expensive part in our dishwasher failed, and the motherboard in our washer was fried.  Also re-read the above section for edited parts.