Easiest solution would be to copy the files to a different directory before editing and copy them to the original location after editing.
Take a look at this question: Windows Linux Subsystem - Accessing Files outside of Ubuntu
It has reference to the GitHub Project for the
BashOnWindows Project. Specifically the
Issue 402 or more specifically this comment which reads:
@ducminhnguyen -- copying directly into the Linux subsystem from Windows is not supported, according to discussion on other tickets. There is a directory under AppData somewhere (I forget where) that appears to contain the files for the WSL filesystem. But if you put new files there, or modify existing files there, your changes are not reflected correctly inside WSL.
My best guess is that Linux needs to store different metadata (and more caching information, etc, since its disk-buffering model is also different) about its files than Windows does, and that this is currently implemented by storing the master copy of the structure of the Linux filesystem in a database of some sort, and just using the Windows filesystem as a convenient BLOB-store for that database.
If you really need to do this, a workaround would be to write a drag'n'drop .bat script or somesuch that does bash.exe -c "mv %1 /home/$USER/". (You'll have to do some clever work with sed and tr, probably, to translate %1 to a valid WSL path.)
Alternatively -- could you put your files in a Windows directory and, within WSL, do "cd ~; ln -s /mnt/c/path/to/my/files" to make them appear to be in your WSL homedir?