How to force MacOS to regenerate /etc/resolv.conf file?
I found a solution today. Actually the file is not /etc/resolv.conf in mac OS. It is /var/run/resolv.conf

So do this:

sudo rm /etc/resolv.conf
sudo ln -s /var/run/resolv.conf /etc/resolv.conf