Umm, not sure which version of notepad.exe keeps a lock on open files. None that I've used in the last 25 years.
This is also why so many people run into problems trying to eject removable drives -- because the last thing they did was to save a file onto that drive, and now Outlook or whatever the program that did the save has its current directory pointing there.
It makes sense since 10 or so years ago it was often the case that one file explorer had a lock on a folder and another file explorer couldn't delete that folder. Then tools like processviewer.exe gave some insight.