Continuing the discussion from Files getting locked on shared volume using Docker for Windows:
My variation is using Docker (ver 25.0.1) directly on Windows 10 in order to create a Windows based image for doing builds. The VCS repo is cloned/pulled to a docker VOLUME.
Some build output files get locked and cannot be deleted/overwritten, with the general message
The process cannot access the file because it is being used by another process
The lock is released on container re-start.