Any idea why I can't edit a file even if I run vim as root?
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 ?