Frequently this is caused by a loose connector to a thermal protection device (a TCO) or some other connector that has a plastic sleeve over it. The connector is loose, which is causing heat, which is melting the plastic. You would have to remove the cover to find the bad device and connector. This is a job for a professional microwave repairman.
If you need further help, reach me via phone at https://www.6ya.com/expert/ronald_e6b9572cebe3ad27