Here’s a good idea. Apple laptops with the T2 security chip have a hardware interlock that turns off the microphone when the cover is closed. Apple stresses that the interlock is hardware based and can not be disabled by software. The 2020 iPads will also have the feature according to Apple.
That’s not a security panacea, of course, but it does prevent malware from spying on you when the laptop cover is closed. Every laptop manufacturer should implement something like this. I’m sure a simple mechanical or magnetic interlock would do the trick so something like the T2 chip wouldn’t be required.