My Apple Magic Mouse A1296 was suddenly turning off whenever I moved it around or bumped it. I pulled the batteries out and noticed some battery acid deposits on the positive terminal of the mouse. Easy fix, once again my fiberglass pen to the rescue, in the picture below see the battery acid on the left terminal and the cleaned terminal on the right side:
Since cleaning the terminals the Magic Mouse is once again working flawlessly.
** Update 11-16-2022 **
Oddly, it worked fine for a while, but now it’s becoming unusable again. I may attempt this hack, but it hardly seems worth it:
Others suggest make a small paper airplane and wedging between the batteries, sometimes with tinfoil at the battery leads to tighten up tolerances. I tried the paper airplane route, will report back…