I’ve had that happen a lot in the past. For me it has always been fixed by replacing the cable. I buy braided ones so my cat doesn’t chew on them, but eventually they will all stop making reliable contact with the ports and I was having to reseat them constantly. I used to buy one third party’s cables but found they would start causing the issue after only a few months. My current cable (different third party) has lasted almost two years now. I don’t get the random disconnects anymore at all. (Well, the controller kind, anyhow. Getting disconnected from the server is another problem entirely.)
Thanks for the post. My controller a cheap xbox replica which I purchased Jan 23 and has the cable hardwired. May try buying a replacement if the problem persists.