To expand on my comment…
Vim doesn't do that kind of fancy thing on the remote machine, no matter what account you use. It's limited to downloading and uploading: reading a remote file means downloading the file in a temporary location on your local machine, writing a remote file means uploading the local copy to the remote machine.
It means that you won't be able to
sudo before editing on the remote machine.
If the account used to write/upload the file is not root you can't overwrite the root-owned file. That's basic UNIX/server security.
ssh into the server and use Vim there or use KL-7's snippet with the right account.
:help netrw-xfer, and
:help netrw-quickmap for additional features such as directory listing. No
sudo in sight.