Losing mouse control on Xbox Series S/X

I pause the SIM start up YouTube, start a video then go straight back to the flight simulator and most of the times the mouse is waiting