Any idea why I can't edit a file even if I run vim as root? I am on OSX Mojave and I have a file with the following permissions:

-rw-r--r--   1 root  wheel   2.7K Jan 31 04:32 settings.json

I did a sudo su - and now whoami returns root. 

Any idea why I still can't save any change I make to this file? When I try to :w in vim I get "settings.json" E212: Can't open file for writing.
Like you said in a comment , it's a file in Bitdefender antivirus's folder, so there is a chance that the software is blocking anybody to access writing the file.

Have you tried to stop Bitdefender to unlock the file ?

Otherwise, if you try to copy the file, then modify it and put it back in the folder, did it works ?