Clothes push dryer door open just enought to stop cycle

Help! When the dryer door is shut and the dryer is turned on, the clothes push the door open enough to shut off the cycle and the drum light comes on. If something is propped up against the dryer door, the cycle will finish. Could you please advise me on how to fix this problem.

Thank you
Claven

You may need to replace the switch. mine does the same thing right now and it’s the switch that the door shuts on. It’s got a crack in it just enough to make it wobble like a loose tooth. it’s not broke off yet, but I am going to replace it.

Sandra