Now it makes sense. I was also seeing issues with other scripts but without the apparent data loss issue and jumped to the wrong conclusion. Glad you were able to repro it easily and figure it out.
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.