Safety Rated Sensors
They come in all varieties, like induction switches, mechanical switches. They are all ridiculously expensive, moreover you need to connect them to a safety PLC or safety relay which are also ridiculously expensive, safety sensor without safety module (PLC, relay,..) has no safety functionality.

Instead of using cover safety switches, you can bolt the cover with special screws. If they are non-standard it means that you need a special tool and it is assumed that only trained personnel would open the cover, so he/she knows the risks. Further you apply a sticker: Do not open before disconnecting power wires.