This is expected. You cannot write to the app bundle, it is read-only.
Your mutable data needs to go elsewhere in the filesystem.
There ought to be some introductory docs about this somewhere….
Topic:
App & System Services
SubTopic:
Core OS
Tags: