Just a correction, to reproduce it seems I need to do the following:
> sudo iptables-legacy -F
> sudo iptables-legacy -X
> sudo iptables -F
> sudo iptables -X
> sudo systemctl restart docker
> docker network create test-net
> docker network rm test-net
> docker run --rm alpine ping -c 4 1.1.1.1
Without the removal of a network, it might not be possible to reproduce it
always. But this way it seems to always reproduce.