Having the same issue with Magic Mouse 1 on Macbook Pro 13" 2020 (4 USB-C model). Tried the battery contact trick but it does not seem to work and Apple Wireless Keyboard (old version) has similar issue.
Sometimes they work ok and I get maybe one to three disconnections per hour. Sometimes it gets bad enough that the mouse and keyboard start continuously disconnecting one after another. A temporary fix is to alt+shift click the menu bar bluetooth icon and to reset the bluetooth module from debug-menu. Tried to factory reset all the bluetooth devices also.
Bluetooth system seems to be messed up somehow and gets worse with multiple devices. Been trying to pin down what could cause interference (set apartment wifi to 5G only, not using Bose bluetooth headphones etc.) but haven't found a permanent solution so far.
There's a long thread about keyboard / mouse connection problems here that suggests removing Android File Transfer app (haven't used it myself) and later in the thread of keeping iPhone more far away which I'm now trying out. Was initially thinking of upgrading these old generation wireless input devices to latest but there seems to be problems even with newer devices according to this.
https://discussions.apple.com/thread/250069764