Magic Mouse is frequently losing its connection to MacBook Pro
Solution 1:
Batteries are loose
Apple designed the Magic Mouse battery compartment according to the official specification for AA batteries. Unfortunately, while Apple engineers were quite precise, the manufacturers of batteries are not. In practice, batteries vary in size, just enough to be problematic in the Magic Mouse.
Given that the batteries are hanging inside the mouse with only the tension of the terminal receptacles to keep them in place, incorrectly sized batteries can easily be pulled by gravity, falling down ever so slightly, just enough to lose contact with the electrical pads.
Wiggling the mouse is enough to re-establish contact between battery and the pads. For a while, until they fall again. Thus the annoying disconnect-reconnect-disconnect-reconnect loop.
Piece of thin cardboard
The solution is to use scissors to cut a piece of thin paper cardboard the size of the batteries. Lay this piece over the batteries before engaging the metal cover on the bottom of the mouse. The cardboard should touch only the batteries, but not the surrounding compartment of the mouse. Your goal is to get the metal door to push the paper up against the sides of the batteries, just snug enough to prevent the batteries from falling downward.
I have found the perfect thickness of cardboard to be the box enclosing a 12-pack of soda cans. A business card might do. You need about a millimeter. Thicker than sheets of paper. Card stock might do it, but may not be thick enough.
Solution 2:
The battery connection is very sensitive on the magic mouse, which makes the batteries move around slightly when you use the mouse which is enough for it to loose power. Try tapping on it and you'll see.
When this happens, you need to shake the mouse or open the hatch. This usually works.
They should have used the traditional spring to keep the batteries in place.
Solution 3:
I found that just removing the batteries and cleaning the terminals with a paper towel on both the batteries and the mouse fixed the problem. I think the people who used paper spacers on the sides of the batteries and aluminum spacers on the negative end of the batteries actually just cleaned the terminals by removing and installing the batteries and the spacers didn't do anything. May be some coincidence but no loss to try.