Older versions of the Docker documentation pointed it out:
Note : In Macvlan you are not able to ping or communicate with the default namespace IP address. For example, if you create a container and try to ping the Docker host’s
eth0it will not work. That traffic is explicitly filtered by the kernel modules themselves to offer additional provider isolation and security.
Source: Macvlan network driver | Docker Docs
Though, there are ways to work around the limitation: