That is because of Windows. Windows can’t handle 2 programs reading from the same midi source. Let’s imagine you have your Daw reading Midi, plus 1 standalone virtual synth reading midi from the same source, one of the two program would crash I don’t know of a solution so far … Maybe someone else does
This is not a Windows problem, it is a problem of the default midi driver which can’t handle multiple clients. Crashes are the result of bad error handling in the software, for example Reaper won’t crash.