Unity CS2012: Cannot open Assembly-CSharp.dll for writing

I’ve recently encountered an issue with the Unity Editor where every time I save any change to the code (in Visual Studio), once I get back to the editor I get this error:

error CS2012: Cannot open ‘C:.…\Library\Bee\artifacts\1900b0aE.dag\Assembly-CSharp.dll’ for writing – ‘The requested operation cannot be performed on a file with a user-mapped section open. : ‘C:.…\Library\Bee\artifacts\1900b0aE.dag\Assembly-CSharp.dll’’

I have found that my system thinks that this particular file is open, even after I exit Unity. Once this happens, the issue persists and I can no longer open the project again, even after a restart. The only way I’ve found to get around this is to delete the library folder and let Unity re-create it. Then, the project works perfectly, until I try to edit any code in any way again. This has been happening for every project I have, and even for the most recent Unity-2022-3-LTS.20f1

Please let me know if anyone can help. Thanks you.