First of all, it ALWAYS has used IP addresses.
If you set up a static address, it will work. You need to make sure that you have DNS settings in place for the container as well. If it’s not resolving all the addresses something else is going on.
And if things are configured correctly, it will work when using all the internal networks except to me it gets messy so I almost always put the container on my main network.