Maytag dryer runs with door open

Maytag dryer continues to run with the door open. Motor makes a noise when the door is closed but runs. Unit will cut on & off correctly otherwise. Door switch is good.

Here are your parts includes a wiring diagram.
Parts for Maytag PYET444AYW Dryer - AppliancePartsPros.com

I cannot figure out how this unit is doing this as the door switch removes Neutral from the motor when it is open.

Is this unit new to you and/or hasit ever run correctly?
My thinking here is someone has messed with the wiring.

How did you check the door switch?

Switch tested good but I replaced it anyway. Have owned the unit since it was new. Ran fine until this week. I thought it must be the motor but I don,t want to keep throwing parts at it ( motors are not cheap). Might be time for a new dryer. Thanks for the response I know it is hard to diagnose without seeing it.

For it to run the motor must be getting Neutral onto connection 1 which the door switch should disconnect.
Perhaps there is a short in the motor to ground onto this connection.

Hopefully you have a meter.
Set the meter to the most sensitive resistance reading usually 200 ohms.
Before starting short the meter leads together so you can tell if there is a zero offset in the meter.
Unplug the motor now check 1, 2 and 7 to the frame/ground.
All of them should be infinite ohms.
If not there is a short in the motor probably to ground so the motor is getting power from L1 to ground instead of L1 to Neutral with ground just being an electrical safety.