I'm going to preface this by saying that I've seen many, many bug reports and threads with very similar issues, but no useful fixes. Using Ubuntu 18.04 and Xorg.
For some applications, clicking inside the window causes window focus to be "stuck" on that window until the application is closed. I can move the mouse freely, and scrolling works sometimes. I cannot move the "stuck" window or hit the x
in the corner, but I can click within the window and alt tab to other applications. Alt tabbing to any other application will move that window to the top, but any clicks are registered on the "stuck" application. Sometimes, this brings the "stuck" application back to the front, sometimes not.