I’m afraid that these are non-configurable system buttons and there is nothing we can do with them. The only suggestion is to enable Dark Theme in app settings to make background darker so that buttons become visible.
Honestly, I have mixed feelings regarding Your answer, because this situation only happens in OnlyOffice. Every other app has regular grey system buttons, that are perfectly visible.