Often background processes keep files locked.
I had some expeerience with AlbumArtDownloader, which sometimes locks 1 file in a directory. Since I found this reason for my problems in MP3Tag, I added a process kill in one of my defined tools in MP3tag for AlbumArtDownloader.
https://community.mp3tag.de/t/locked-files/17915
https://community.mp3tag.de/t/locked-files-durch-aufruf-des-albumartdownloaders/17916
Since you mention Flac files:
Some latest versions of the Spotify player lock Flac files. Spotify, funnily enough, does not declare this to be a bug, but rather a necessary evil to quickly include local music files.
https://community.spotify.com/t5/Desktop-Windows/FLAC-files-in-Downloads-directory-opened-accessed-and-locked-by/m-p/5204410
I use LockHunter to have a quick look at such files with a right-mouse-click and a selection in the content menue. LockHunter tells you which process locks the file.
https://lockhunter.com/