Microphone access on Safari / MacOs when window is in the background

Since the last two major updates on Mac (BigSur, Monterey) i’m having this issue where Safari microhone capture via getUserMedia does only work when the Safari window is visible on the screen (1px is sufficient). Whenever Safari is moved to the background the microphone stops transmitting sound, as if it was muted by a hardware button. For the web-application this is not transparent afaik.

Is there a setting or even a documentation or blog post for this? I wasn’t able to find any info on how or why this is happening (even though i can imagine why).

This behaviour is especially inconvenient for multi user web-apps using webrtc, where microphone input can be used together with screen sharing (getDisplayMedia). Users usually assume that they can be heared when sharing their entire screen, even if safari is not in the foreground / visible. It feels inconsistent to on the one hand allow screen sharing when the safari window is not visible, but on the other hand block microphone transmission.

I would be grateful for information on why this is happening and if there is a plan from apple to change this in the future.