Markdown not completely downloaded after update of internal markdown editor

Nextcloud version: 19.0.0
Apache: 2.4.39
PHP: 7.3.19

Whenever I have upload a markdown file to my nextcloud instance I can download the exact file from the interface. However, when I modify the file with the built in markdown editor, I can see the changes in the webinterface, but when I download the update is not reflected in that file.

It is also the other way around. If I upload a markdown file and then update it locally, upload it under the same name, I cannot see the updates in the webinterface.

I can see the following in the Logging of nextcloud. Not sure if it is related.

imagettftext(): Problem doing text layout at /nextcloud/lib/private/Preview/TXT.php#92

I recently updated to version 19.0.0 and I believe this behavior started then. Before that I did not have any problem. I actually noticed it because I synced my joplin notes with nextcloud and it stopped working due to the issue above.

Also I was looking for similar issues on the forum but wasn’t successful. Any help is highly appreciated .

[edit] when looking at the file in vim on the server, I can see the file with the latest edits.