It could be the safety switch on the door latch, maybe as the dryer heats up, the switch warps and looses contact, the dryer then acts as if the door were open?
open