This is definitely not expected behavior. I understand how annoying it could be. Could you please share the XD version of your machine? Does that happen with every file or with a specific file? I would suggest switching focus for a while from XD app whenever it happens next and then come back to XD and see if that helps.