something is stealing focus I would lean towards anti-virus some popup like the taskbar or Windows Security. I am guessing of course but these are easy things to rule out.

There are ways to set windows to always be on top I am not sure if this would be a quick bandage fix.