Hi,
I have the same monitor. Use my display port for my PC. Use the HDMI for my PS4. I have something similar. Occasionally I will sometimes not get a signal from the device I'm not using. Like if I'm using the PS4 for a hour, then switch to my PC, it will act like it's not getting a signal. Until I move the mouse, or use the keybaord, then it will start getting a signal. Or if I'm using the PC for 15+ minutes, then switch to the PS4 it won't have a signal for the PS4 went to sleep mode. And I have to use it to get out of sleep mode.
There may have been a few times, over the year or two I've had both devices sharing the monitor, that I'd get impatient and restart the PC, and then all is fine. But it restarts and boots up to login screen very fast. Maybe 10 seconds.
I think for me, in both cases, one of the devices goes into sleep/hibernate mode, and stops sending a video signal out to the monitor.
Have you tried adjusting your PC's settings with screen saver, and sleep, or standby modes?