How to reproduce:
When I get a “Unity not responding” I can’t close the app with the X buttton. So I open the “Force quit application” of Apple (is like the task manager of Windows) I select the Unity editor and force quit. Then I try to open the Unity project again but it says that is already opened. The only way to fix this is restart the computer.
I found a solution for the lock file not being able to be deleted you need first to remove the project from list via unity hub, then restart your pc and then you should be able to delete it.
sounds like either a process is still running or something like antivirus hasnt let go of the file yet. Have you done some process debugging to see if thats the case?