That’s why you need to disable network manager, to stop it overwriting resolv.conf. The simple way is to disable it and use /etc/network/interfaces and /etc/resolv.conf instead. Of course there are a lot of strange linuxen out there now that may have decided to do it a different way, but it’s the conventional method.