Client-side there is a packet which involves client focus too, so being alt-tabbed will have an effect. Unless they removed this in the super recent versions I'm sure it's still there.
As for mouse's origin being -1 -1 don't worry about this it'll be different each time, with osbot you're in good hands.
Using mouseOutside with a couple other mouse tricks (can't reveal any secrets publicly) would make it even better. Just try not to force the mouse to same coordinates each time.