Magic keyboard stays connected but won't type any characters
Today I encounted a problem with my Magic Keyboard three times. It remains connected via bluetooth and the battery is charged, but it won't type any characters into any apps. The problem persists if I turn the keyboard off and on again. The problem is resolved by a reboot, but it happened twice again shortly after reboot. Right before the issue happens, characters are delivered slowly and dropped when typing.
I don't have any apps running now except Chrome and Sublime text. The keyboard has never been connected to another Mac. The wireless trackpad works fine. It's the newer keyboard with black keys, number pad and touch ID.
Any ideas before I utilise my AppleCare?
Computer: Mac Studio M1 2022
macOS version: 13.5.2 (latest; no updates available)
Keyboard version: 1.4.8
Mac Studio, macOS 13.5