Recently, I replaced batteries for my magic mouse, but very often, the system disconnect my magic mouse unexpected.
Finally, I learned that, after I rub two side of battery on cloth or other rough surfaces many times, install it in magic mouse, the problem was fixed.
If you have this problem as me, just try it like me.