My Whirlpool gas oven wont stay lit

I had been having issues with my oven staying on. It would light and heat up and randomly would shut down during a baking cycle. As this became worse and more frequent I replaced the spark igniter but didn’t fix the problem. Has since gotten worse to the point that cant use oven. When I turn on, the burner ignites and burns for approx. 5 seconds and then shuts right down. It will then intermittently repeat the lighting process with same result. No error codes on panel. Pre-heat timer continues as if nothing is wrong.
I checked burner tube but didn’t see anything obviously wrong with it. Not 100 percent sure what to look for anyway. All burner openings working during brief times it is lit.
I’ve read and been told different things including faulty gas valve, spark module, burner tube etc. Anybody know what is the most likely cause of this problem? By the way, the broiler and stove burners are fine.