This suggestion is not the better way to handle this happening. The file cannot be set immutable unless you don't want any other domains ever added to it, breaking adding new accounts, addon domains, parked domains and subdomains.
Additionally, manually re-adding domains to /etc/userdomains isn't a good method to get a domain working.
First of all, move all these files and regenerate them properly without these manual edits:
Code:
mv /etc/userdomains /etc/userdomains.bak
mv /etc/domainusers /etc/domainusers.bak
mv /etc/trueuserdomains /etc/trueuserdomains.bak
/scripts/updateuserdomains
If that script when run mentions any domain missing or conflicting due to another user owning it, then that's the issue. You'd then want to go to /var/cpanel/users location and remove the domain from the user's file that shouldn't be owning it and re-run "/scripts/updateuserdomains" again.