Hello gtzr11,
If we're understanding you correctly, your Mac microphone mutes itself when there is sound coming out of the speakers on the Mac. Is that correct?
If yes, we advise that you restart your Mac (Shut down or restart your Mac) and make sure it's fully updated (Update macOS on Mac). Once those are done, please test this issue.
If the issue persists, continue by testing to see when this behavior occurs. First, put your Mac into safe mode and test. Booting into safe mode will disable any startup and login items from automatically opening, which can help us to isolate the source of the issue further. When you do this, you’ll see some unusual behavior from the display; this is to be expected. Please follow the steps in this article: How to use safe mode on your Mac.
We hope this helps. Let us know if we can assist with anything else at all. Take care.