Hi there!
I've been through this for weeks, using Monterey without any success bluetooth connection. Until today, its work perfectly smooth.
I simply using application called ToothFairy for bluetooth connection and my magic mouse is all functioning again. No more connect-disconnected randomly.
Gonna try this for more days.
Hope its help.
Thank you.