Applications use windows-like window management buttons

Might try this, given that OnlyOffice uses QT:

I am not sure if the version in use in this thread is QT5 or QT6, though...
I just edited that guide to include QT6 instructions.