Sonoma 14.4.1 on MBP 14" A2442. When switching out to HDMI using KVM switch, sometimes the window refresh/repaint isn't working. You end up with either blank window contents with the regular window frame OR a gray area where the entire application should be. The external monitor is a higher resolution (2560 x 1440) than the MBP screen (1512 x 982) and when switching out on HDMI to it, the window repaint notifications seem to not always be sent. I've seen this occur in various apps including IntelliJ and iTerm2. Sometimes if you switch back to just the MBP onboard screen it will repaint correctly then you can switch out again to the external monitor on HDMI and get a successful repaint. I am plugging directly to the HDMI port on the MBP and not using an HDMI to USB-C adapter.