I believe you have a bad door switch in this. there are several door safety switches and you probably have a bad one. the problem with microwaves is they are dangerous to work on. this is the door switch,
please read this and call a tech out to fix this, at least this gives you an idea of what may be wrong, please read.
Consumer Product Safety Commission
Electrocution Hazard with Do-It-Yourself Repairs of Microwave OvensCPSC Document #5061
The U. S. Consumer Product Safety Commission (CPSC) warns against do-it-yourself repairs of microwave ovens. Each year, on average, four people die from electrocution trying to repair their microwave ovens. Microwave ovens use high voltage which makes it particularly hazardous for consumers to remove the cover and touch electrical parts. The possibility for electrical shock from a microwave oven still exists even after the oven is disconnected from the power source. Should certain internal devices fail, even unplugged ovens can cause serious injury.
The Commission strongly recommends that consumers have professionals repair microwave ovens because electrical appliances can be hazardous if consumers expose live electrical parts.
Removing the cover of your microwave oven and touching an electrical part can kill you.
Have a professional repair your microvave oven , hope this helps, thanks Bryan