Indeed, I need to remember to unplug the USB-C cable between my macbook pro and my screen, otherwise it flickers on and off every couple of seconds during the night
wired controllers on nintendo switch docks do this, and yes, it is really annoying. It is about every 3 minutes. and it's for the same reason as the macs and windows machines - the switch wakes up and checks for updates then goes back to sleep.