Miclocks are a thing, or any chopped 3.5mm 3 prong plug should do the trick
https://mic-lock.com/products/copy-of-mic-lock-3-5mm-metalli...
This still doesn't stop a program from switching the input from external back to the internal mics though afaik