MacBook's external display stops working

Hi MPUers, my MacBook Pro 2018 is connected to a LG 34 inch monitor. It works fine, but lately when I turned off the monitor (during night) and then turn it back on in the morning, the monitor does not display anything. They are connected via USB C to USB C cable and I have tried unplug and re-plugging and that doesn’t seem to work. The only solution I found is restarting the laptop.

Any suggestions on what can I do to resolve this? Is there a specific macOS service/process I can restart to make this work without restarting my laptop every single time.

I have the same issue with a 2012 Mac Mini server connected to a Dell external monitor so I’m also interested in a potential solution.