I'm wondering that this was working...
because there actually is a bug in the file component for writing to shared storage, see also here Test on AI2 test server - targetSdkVersion=33 │ Aug 31, 2023 │ storage permissions - #22 by Anke
In the following thread @Anke recommends to use the MFile extension as workaround
Taifun