The terms of use block the opening of only office documents

About my environment: My Nextcloud Version 21.0.4 is located in our DMZ network behind a reverse proxy and the onlyoffice Document-Server can be accessed directly from the Internet.
The problem: If a new user carries out the user self-registration via the internal network, the Nextcloud will work properly after accepting the “Terms of Use”. However, these users cannot open only office documents. The process ends with an error "Download failed "

The workaround:
However, if the same user opens the Nextcloud session from the Internet, the user has to accept the terms of use again (why?) And then the user can open only office documents from the internal and external network.

This suggests that the acceptance of the Terms of Service from the internal network and from the external (Internet) is the cause of the problem. A one-time acceptance of the Terms of Service, regardless of the network, should be sufficient for a user!

The Command occ config:app:set terms_of_service tos_for_users --value ‘0’
Is not the final solution ´, I Think, because this
disables Terms of Service Permanetly for all Users and they are not able to accsept modified ToS by a reset of the Terms of Service.