Joplin Server on Synology with Docker and Portainer, local use and VPN only

I see that hostnames cannot be resolved using VPN, if I don't use my own DNS server or edit hosts files.

The problem should be solved, if Joplin could be accessed by IP address instead of by hostname. In this answer: Guide for Joplin-Server on Raspberry Pi - #21 by MrKanister It is stated, that http://192.168.x.x:22300 should give me access to Joplin. However, http://hostname:22300 is the only option that works, regardless of any variant of APP_BASE_URL in the docker compose file.

What could cause this?