When I connect my headphones (with built-in mic) into the 3.5mm jack of my MacBook Pro, the mic input picks up audio that is played through the headphones. This means that whenever I'm on a voice call, the other party can hear my system audio. This issue is not specific to any app. If I play any audio on the system and monitor the input level for the external microphone via System Preferences>Sound>Input, I can see the bars fill up, and this seems to be proportional to the volume of the headphones. I'm sure the headphone sounds are not being physically picked up by the mic. Also the headphones themselves are not causing this issue, because I tested them on my phone and there are no feedback loops. I'm inclined to think it is either a hardware issue with my Mac or something that is caused by software. Is there a way to figure out what's causing this? I tried booting into safe mode to see if anything I installed is causing this, but audio doesn't work at all in safe mode. I'm running MacOS BigSur 11.4 on a 2020 MacBook Pro (Intel 13").
Check the plug fits properly into the socket. It sounds like you may have a short. Alternatively, the pinout may not be correct for Mac… but you didn't say what phone you have.