Thank you very much for your feedback.
I'm wondering if it's caused by the IIS Express related libraries or something else. Please let me brainstorm here.
One option would be to switch to Custom server in the project properties and run the iis express from command line. If this causes the problem to go away we will be positive this is caused by IIS Express related libraries we use to manage it. But we wouldn't know 100% what really caused it.
So the second option to really find out what's happening is just to wait when this happens. Then attach with another visual studio to the VS process currently in the deadlock state(if it really is a deadlock). Then if you break and it's really a dealock we should be able to see it. e.g. It might be clear from call stack on Main Thread. If not Paralel Stack View (Tasks View) might help us.
I would be happy to help with any of this.