If you’re using docker compose, it will create a default bridge network with a CIDR that could overlap with a real network routable to the host, which messes up network egress from the container.
If this is the case it’s useful to specify the bridge network CIDR in the compose file as something you don’t use.