Not had any problems with my magic mouse but I was experiencing a number of other issues recently. I think Apple sometimes do background updates that need a restart. If you haven't done a restart recently give it a go.
Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)