There is a KB article on this
Computer hangs in an OSD task sequence debug mode - Configuration Manager | Microsoft Docs
However it doesn't fix the real problem. The TS Debugger window still stops after each reboot waiting for input so the recommended workarounds don't fix it. If you want to debug inside Windows, only turn the debugger on past 'Setup Windows and ConfigMgr' and a restart step.
You turn it on by setting the TS variable TSDebugMode to True