Collabora Online code server not working via external domain

I recently setup Nextcloud and I haven’t had any major problems with it. I used Cloudflare Argo Tunnel to securely link my local server to the internet, and I can now access my Nextcloud server from LAN with its IP, or from the internet with its domain.

However, when I installed the Collabora Online CODE server and got that setup, I have got an interesting issue. I can use Collabora to edit files but only when I connect via IP, if I connect via the domain then a popup appears saying “Connection to server lost” and I see the loading screen perpetually.

I’m not sure what the root cause of this issue could be, but if you need any more information to help me diagnose the problem, then I can get it.