

I have a x1 carbon gen 9. Be very careful with the USB-C ports. I leave mine on my desk and my hub kept cutting in and out while using it and its gotten worse over time. I’ve seen others with similar issues and it seems like the fix is to solder on a new port. Its a work laptop so I just deal with it.
KDE does have focus stealing prevention, Have you messed with that at all? https://docs.kde.org/stable5/en/kwin/kcontrol/windowbehaviour/index.html#focus-focusstealing The only thing I can think of is maybe some notification steals the focus and doesnt give it back to the window.