It is generally not safe to delete the Library folder while the project is open in the Editor.
There are some old docs that refer to this:
https://docs.unity3d.com/530/Documentation/Manual/BehindtheScenes.html
"However, it is always safe to delete the Library folder (while the project is not open in Unity) as all its data is generated from what is stored in the Assets and ProjectSettings folders"