audio – How to force the phone earpiece to be used when an external microphone (headset) is connected

I want to keep the sound output on the phone, the earpiece or the loudspeaker as it is normally when I connect an external microphone. It’s detected as a headset so they’re disabled as well as the microphone.
My internal microphone is dead, and I want to use this small jack microphone I have.

Is there an obscure setting, working app, or adb command for this?

I tried a few apps, but none of them works. “Lesser AudioSwitch” got the closes. The microphone works so does the phone speakers, EXCEPT when I start a phonecall, then the microphone input stops working and I’m not heard by the person I called. Which would be the main reason to use the microphone…