I have an xbox one x and every now and then I get randomly disconnected from xbox live whilst remaining connected to the wifi. It seems to happen most often when I have spotify on and playing a game at the same time. It also used to happen on my old xbox one but didn't bother me at the time but it has become much more frequent and I can barely even play a 3 minute round on rainbow six siege. Please make me aware if this can be resolved
If you're gaming online and using multiple streaming services on this device we would always recommend to have this wired into the router if possible as WiFi isn't guaranteed at a constant stable speed.
If this is not possible for you I can send you a link to some helpful hints and tips for improving your wifi here and here.