Apple have made some great products in recent years.. like AirPods, etc. The Magic Mouse most certainly is not one of them. I find the shape uncomfortable, and I find it a constant problem with spurious inputs and the like. It sits unused here on my desk, and I've got back to a dependable Microsoft Intellmouse Optical from about 10 years ago!
try opening the lid of your macbook pro until just before it decides to turn on the display and see if it helps. i have to leave my lid open like this for the mouse to be useable.