electronic control or safety valve?

Howdy-
The oven on my magic chef stove is shutting down prematurely. I’ve replaced the ignitor and the temp sensor. I set the cold oven to 350 deg. and the digital readout comes on reading 230 deg. The burner ignites, the readout climbs to 350 degrees within 45 seconds or so, and the burner shuts off. If I leave the oven door open the temp indicator climbs much slower and will reignite the burner as needed. Is this a gas valve problem or an electronic control board issue (or someting else)? Thanks