Try moving away from the WiFi router to see if this reduces Bluetooth lag or disconnections.
Refer to the documentation of your WiFi router for information on changing the channel that it operates on. When there is interference, the ‘safer’ channels are 1, 6 and 11.
If your WiFi router supports it, try switching the WiFi signal from 2.4GHz to 5.0GHz. Since the Bluetooth connection works only on 2.4GHz, switching to 5.0GHz will completely stop the interference.
If you are using a Mac, you can check the Apple support site for more details