Case switch?
Oldskool laptops have case screws under the battery, so the motherboard will always be unpowered when opening the case. We'll depending on the charger socket interfering with opening I guess but that can be achieved. I wonder if there is any legitimate need for the laptop to stay on while open, or should the machine have a simple switch that powers it off when you open the box?