Same issue,
if you download, add a file and then replace the container of an app using Xcode Organizer, I receive permission denied error and can't read the files from the app too.
Here is a stack overflow topic on the same problem: https://stackoverflow.com/questions/77183697/xcode-devices-replace-container-function-replacing-the-container-with-incorre
Topic:
App & System Services
SubTopic:
Core OS
Tags: