I was trying out the new ScreenCaptureKit (https://developer.apple.com/documentation/screencapturekit/capturing_screen_content_in_macos) on MacOS 12.3 Beta (21E5196i) and Xcode Version 13.3 beta (13E5086k) by building and tweaking the official code sample. And the new kit requires the Screen Recording permission for apparent reasons.
However, during the process, I found that a lot of times the app I'm developing on would get stuck in a state where it doesn't have the permission whereas I can't grant it the Screen Recording permission either. See this recording for more details: https://www.loom.com/share/f866c21a1dff4b82907892644ed6f0b6.
I have filed a feedback FB9893786. But has anyone see something similar, and are there mitigations for this that I have missed?