If the only reason is edit a particular file I think switching to an interactive shell is already a "security issue". It's a point of view though.
Consider that you switch to
root interactively. Then whatever you run, runs with highest privileges. Now, question is if you do trust applications you are running. Particular application can have a bug which poses a security issue.
My point is, that you want to minimize the stuff you run directly under the
root. Running X application brings a complexity of whole X stack and if any backdoor or escape can be misused, attacker gains the
root access. And it's not about the X stack only, it's about any software you run under the
root. That's also reason why you / we have to be very careful about applications which has
setuid bit set.
As a solution to your workflow I would offer the
sudoedit command. You can use it in form of
$ sudoedit <file_to_edit>
It will try to authenticate / authorize you (as regular
sudo does) and then it will run your preferred editor (set by
EDITOR environment variable). Benefit over running as
$ sudo $EDITOR <file_to_edit> is that the editor itself runs under your original privileges and after you exit it, it will replace the file with the results of your editing. Need to exit the editor to make changes effective might be a bit disruptive though.