PlistBuddy denied writing the plist file with latest Xcode beta?

After updating to Xcode 15 Beta 6, I'm now getting an error the the Sandbox is preventing PlistBuddy from modifying the project's plist file:

error: Sandbox: PlistBuddy(8595) deny(1) file-read-data /Users/laurent/Documents/Development/Personal/Mac OS X Projects/xxxx/***-Info.plist

Anybody knows a fix?

In your target's build settings, set User Script Sandboxing to NO.

Thank you to jpb for this answer: https://stackoverflow.com/questions/76490618/xcode-15-beta-does-not-allow-run-script-access-to-git-head-and-info-plist

Turn off User Script Sandboxing is an easy but not the good answer... Many apps still need to sandboxing for setting up crashlytics, build numbers, etc. Is there a way how to fix this without turning it off?

I'm thinking the answer lies in adding an output file in the run script but not sure how to do that or what file to add. I also don't think it's a good idea to switch off Sandboxing.

PlistBuddy denied writing the plist file with latest Xcode beta?
 
 
Q