Editing PDF text butchers the layout

,

I don’t know if this is a bug or I just missed a setting – help would be very much appreciated.

When I edit text in a PDF, the layout looks normal. But as soon as I save the PDF (or save as new file, or print-to-PDF) the layout of the existing text – not the text boxes I created myself – is squeezed together and becomes unreadable. Here’s a before and after:

I’ve tried making the text boxes larger so the letters would fit, but that creates even more layout problems. This issue appears in various PDFs and with different fonts and since the fonts are embedded, I guess this can be ruled out as a reason. So what is causing this issue?

I’m using ONLYOFFICE Community Version 9.4.0.129 (x64 flatpak) on Zorin OS 18.1 Core.