It's good to have you on the forum. I'm not a gamer and know nothing about gaming controllers but IMO it's not the controller causing the wifi to disconnct but the other way around. Are you sure you're not losing wifi which in turn makes the controller disconnect from your online game.?
If that be the case, do you ever lose wifi when not gaming or do you game all the time? How often does this happen. If there are other wireless devices in your home, do they ever lose connection?
If it's a usb controller have you tried a different usb port?
To troubleshoot this we would need to know the answer to those questions.
Possibly your internet service is dropping in and out directly from your ISP..
Possibly your signal from your router is doing the same.
Give us more information and we'll try to help you.