Usually this means an application or process still has a file open on it. If you have no applications open when this happens, then it’s probably the virus checker or some file preview process that is keeping a lock.
One utility worth trying is Process Explorer, which can identify what files are currently open. The next time you get that message, run Process Explorer, go into the ‘Find’ menu and select “Find Handle or DLL…” Then type in “L:”, replacing ‘L’ with the letter of your USB pen drive.
In the following example, GIMP has a lock on my USB stick even though I don’t have files open. It seems to be a bug in GIMP where once a file is closed, GIMP doesn’t release the lock until GIMP is closed: