Entering play mode message freezes Unity

Hi,
I am using 2021.3 with XR and randomly i get a message saying “Entering play mode” which lasts forever and i have to quit Unity and restart it again

One potential cause is an infinite loop in your code.

No, cause it is random, most times plays fine

What do the logs say?

The last part says this. Unity is frozen a lot of times, happens with XR with Oculus Quest 2

Registering precompiled user dll’s …
Registered in 0.009224 seconds.
Start importing Assets/XR/Settings/OpenXR Package Settings.asset using Guid(cf25ebd55f97f994196fa71860fb8c9b) Importer(-1,00000000000000000000000000000000) → (artifact id: ‘9cebc092d931ba5cb77e4492a80cc272’) in 0.007203 seconds
Refreshing native plugins compatible for Editor in 2.34 ms, found 12 plugins.
Preloading 0 native plugins for Editor in 0.00 ms.
Asset Pipeline Refresh: Total: 0.172 seconds - Initiated by StopAssetImportingV2(NoUpdateAssetOptions)
Registering precompiled user dll’s …
Registered in 0.009366 seconds.
Start importing Assets/Ett/FireTrainingVr/Scenes/Total_Scene.unity using Guid(43409275160fe57478de3af863bcfda0) Importer(-1,00000000000000000000000000000000) → (artifact id: ‘b25e3a61739d738e83e72a1a13da5808’) in 0.000787 seconds
Refreshing native plugins compatible for Editor in 1.96 ms, found 12 plugins.
Preloading 0 native plugins for Editor in 0.00 ms.
Asset Pipeline Refresh: Total: 0.190 seconds - Initiated by StopAssetImportingV2(NoUpdateAssetOptions)
[Licensing::Client] Successfully resolved entitlements
Asset Pipeline Refresh: Total: 0.003 seconds - Initiated by RefreshV2(NoUpdateAssetOptions)
Reloading assemblies for play mode.
Registering precompiled user dll’s …
Registered in 0.008912 seconds.
Reloading assemblies after forced synchronous recompile.
[Licensing::Client] Successfully resolved entitlements
Begin MonoManager ReloadAssembly