Please attach a sample project (sources only, zipped) and give step-by-step instructions how to reproduce the issue?
How do you know the file is locked?
IIRC something like process-explorer can tell you which process has locked it.
B.t.w.: I'm on Win10 and never experienced this behaviour.
Bart