Your dryer has an electronic control board, motor relay, and a thermistor that is controlling the motor operation and the operating temperatures. The thermistor is a component that is monitoring and communicating with the control board. If the thermistor is not within a certain resistance value the control board will not allow the dryer to stay running. The normal operating resistance range of the thermistor is 19.9 K ohms to 2.5 K ohms and any resistance reading above or below these readings will keep the dryer from staying running when the start button is released.
The resistance of the thermistor changes with temperatures, so if the ambient air temperature is too cold the dryer is not going to stay running until the thermistor warms up within the normal operating resistance range. So when you hold the start button down it will allow the heater to come and warm up the thermistor and that is why it stays running and starting normally there after the initial warm up.
If the dryer is in a room where it's very cold or cold outside air is migrating into the dryer by means of the vent system will cause this symptom. It will cause the thermistor to get too cold and be way out of its normal operating resistance range and the dryer will not stay running until the thermistor warms up.
Try this test when it will the dryer will not stay running:
Begin with an empty dryer and a clean lint screen.
Set the following configuration:
Timer Dial- Timed Dry
Fabric Care/Temperature switch- Cotton High
Signal switch- Loud
Door- must be closed
2. Press the Push To Start switch
If you hear three short beeps and the dryer shuts off after several seconds, the thermistor or wire harness is either shorted or open.