Update:
starting the app with “/Applications/Nextcloud.app/Contents/MacOS/Nextcloud“ - everything works fine
starting the app with with “open -a Nextcloud” - network connectivity fails
If I start my Tailscale VPN client which also has a route to my LAN, it works either way.
So I guess, in my case, the issue is related to how the macOS app selects the network interfaces or the routes, or something related to that.