We do face this issue and did lose a ton of work. That software shouldn’t be available yet, tbh. However, we are able to surpass this issue with syncing the changes manually every 5 minutes.
To do so, do following
nano /etc/systemd/system/onlyoffice.service
[Unit]
Description=Write OnlyOffice Changes
[Install]
WantedBy=multi-user.target
[Service]
OnBootSec=30min
Restart=always
RestartSec=300s
ExecStart=sudo -u www-data /usr/bin/php7.4 /srv/nextcloud/occ documentserver:flush
Replace the php and your nextcloud path to your corresponding one.
Activate the systemd entry with
sudo systemctl daemon-reload
sudo systemctl enable onlyoffice
sudo systemctl start onlyoffice