The external display connected my 2017 Macbook pro 13" i5 blacks out for a few seconds shortly after any of the following:
1. being connected to external monitor via USB-C cable
2. when "awakening" after external display (connected via USB-C cable) has auto turned off (from Energy Saver settings) or
3. after login password has been entered to awaken after sleep/screensaver.
The blackout usually occurs only the one time and does not seem to repeat until the display auto-turns off again. The problem also does not occur on the MBP built-in display – only an external monitor. Resetting SMC/PRAM doesn't help.
Samsung C34J79x external monitor (connected via USB-C)