Modern (2019-ish? forwards?) MacBooks have physical disconnect for microphones when the lid is shut.
Framework laptops have the same solution.