Any changes to the /etc/hosts is ineffective when connected to WIFI, When I disconnect it starts taking effect.
I have tried sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
already
It seemed to be from VPN software I had installed, uninstalled it and reconnected the WIFI and it seems fine.