Actually just had this suddenly happen today myself, never had it happen before. Same mouse, G502 on Win 10. No time to test things, but the behavior seems as if the game had a controller suddenly have control(which i do have plugged in) or I'm in the Steam Overlay. I dont have time to test at the moment, but try disabling the Steam Overlay if it's not already. Any overlay tools might be the cause as a bug out.