As someone who had this issue, I think I found a work around, not really a true fix.
Go to Settings > Privacy & Security > Microphone > Turn everything off except the app you plan to test with
Test and see if you have problems.
If you still have issues, go to Settings > Privacy & Security > Bluetooth > Turn off everything except the app you plan to test with.
I only have Spotify & Teams enabled at this point and have stopped having issues. It seems to be some jacked up implementation of Bluetooth Microphone and the hardware inside causing the issue.
If you want more context on how I ended up here, I took my phone to apple. They tested and couldn't find anything wrong, but replaced the insides of the phone anyway. I didn't even make it back to my house before having more problems. So it is obvious this is a software issue of some sort.
Last week, I was listening to music and switching between Temu and my Amazon apps and my airpods would cut out for a half second. That is when I started investigating turning off the microphone, the minute i turned them off, I could switch between apps without the cut out. Magically, my Bluetooth cut out issues stopped as well.