Granted Screen Recording permission not persisted on beta MacOS 12.3 Xcode 13.3?

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?

Any luck with this? Running into the same issue.

On Settings -> Privacy & Security -> Screen Recording, delete the application's line by "-" button and recreate line.

In project settings, select your target, then under "Signing and Capabilities", in the "Signing" section check "Signing Certificate", should be "Development" for "Debug" configuration.

Granted Screen Recording permission not persisted on beta MacOS 12.3 Xcode 13.3?
 
 
Q