Hi,
Is your keyboard Okay?
I wonder if it is automatically pressing a key like Tab, which changes the focus for the same.
If it is a PC, disconnect the mouse once. Then disconnect Keyboard. Let me know if you can isolate the problem.
I’m eager to hear back and work together to find a solution.