I know this is a known (and apparently longtime) issue, so I'm just adding my voice to the chorus. My M1 Mac mini was returned yesterday due to the unacceptably poor wireless mouse and keyboard performance. I feel bad for anyone getting their first Mac + Magic Keyboard & Magic Mouse thinking the glitchy laggy mess I experienced was normal. It's not normal. It's terrible.