The drum on my dryer stops when the door is open however the heating element does not cut off when the door opens if the timer is on. The heating element will cut off when the timer is in the off position.
Here are your parts
Replacement parts for MED5700TQ models | AppliancePartsPros.com
Sounds like a grounded element.
Check the heating coil.
Unplug the unit and both wires to the coil.
Check it with a meter, should be around 10 to 12 ohms.
Then check from each side of the coil to the case/frame, both should be infinite ohms (open). If not the coil may have sagged or broken and is touching the case often you can actually see this. This can cause it to run when the door switch is open and the motor is off..