Hi Eliyahu, Thanks for posting here in Microsoft Community. Since your power settings are correctly set to “Do nothing” and the issue only happens after closing the lid, it does sound like a Windows or driver-level conflict especially since a reset temporarily fixed it.
I suggest, try updating or reinstalling the graphics drivers (both Intel and any discrete GPU if present).
Also check HP’s support site for any firmware or docking station updates.
If the MacBook works fine with the same dock, it’s likely not a hardware issue.
Also, have you noticed if the display shuts off only after a specific Windows update or driver installation?
Let me know how it goes.
Chard