I was having the same issue as you But I was on Windows Docker Desktop. Basically, network_mode: host
Never works on Windows. Yes, there is a slight improvement on it:
https://docs.docker.com/engine/network/drivers/host/#docker-desktop
Thought not fully working right.
So decided to run it natively on Windows instead.