This looks to me like the controllers are sometimes badly implemented.
I have a HP ProBook with a USB-C/DP output that I plug into an LG monitor with a USB hub. The hub works in USB2 mode + 4K@60Hz (as advertised by LG). This has worked consistently for me for more than two years, using Arch Linux + X11. Sleep, plug, unplug whenever I like, it just works. It seems to also work fairly consistently when colleagues plug in their Windows laptops (also HP).
I also have a HP EliteDesk with a Thunderbolt + USB-C / DP port. This is a shitshow. The same LG monitor works every time for BIOS and such when connected through USB-C.
Installing Windows works. The Windows logon screen sometimes shows up, but not reliably. The Windows desktop has only ever worked once. This same setup usually works with Linux/X11. But after a display sleep, it sometimes figures it can only do 4K@30Hz. Sometimes it chooses some other random resolution. If I unplug it a number of times, it may end up working again. Maybe. Or maybe not. Sometimes I have to reboot. Which may or may not solve the issue.
Plugging in a thunderbolt display (Apple) works more often. But if the screen goes to sleep, there's a good chance it will wake up with some ridiculous resolution, like 1280x720. It's impossible to change it. If the computer goes to sleep or if the monitor is unplugged, it's game over. The screen will never come back again unless I do a cold boot (turn off & on, reboot won't do).
I keep hearing people complaining about macbooks being unreliable with external screens. I wonder if it isn't the same kind of issue with a broken controller implementation somewhere. I've never had the slightest issue with external screens on my 2013 MBP (15" with nvidia dGPU). Thunderbolt, 4k@60Hz, you name it, it works. Plug / unplug when it's running, when it's sleeping, whatever, it just works as expected.