Same problem here with Air M1.
I bought a new Magic Mouse 2 and it started to happen. But it doesn't happen with the first version of the Magic Mouse…
Another thing that also happens is losing the caps lock light on the Magic Keyboard wit num pad.
Really annoying.
Turning Bluetooth on and off for each one or restarting the Mac solves both issues but for me this is not a solution…