Screen Recording on iPhone mutes audio

I’m having some trouble with screen recording on iPhone devices. When a user starts screen recording, whether using iPhone’s built-in recording or an external app, AND enables microphone recording, the audio in-game suddenly cuts. When they stop recording from the microphone, audio starts back in again. I’ve confirmed that this issue doesn’t occur for other apps on the device.

I’m assuming this is some security policy, but I can’t find the setting for it anywhere. I’ve tried “Prepare iOS for Recording” and “Force iOS Speakers when Recording” in the build settings. I’ve even tried changing the AVAudioSessionCategory in Xcode.

Edit: Also probably important to note that this is NOT an issue on Android devices, screen recording internally or with an app on Android works just fine with microphone.

Does anyone know how to solve this?

Thank you!

For anyone curious, I did find the solution to this issue: It seems that resetting the AudioConfiguration can cause all audio to drop, at least on Android and iOS. Due to audio crackling on some devices, I was increasing the dsp buffer on an Awake function on every scene as so:

AudioConfiguration config = AudioSettings.GetConfiguration();
config.dspBufferSize = aBufferSize;
AudioSettings.Reset(config);

Not sure why this doesn’t play nice with iOS, but removing it fixed my issue immediately. If anyone knows why this happens, I’d be happy to hear about it.