If you are talking about the first generation Apple Wireless Keyboard from 2003 then I’m not surprised.As I wrote, this is the first generation Apple Bluetooth keyboard. It is Bluetooth-only. You are talking about the second-generation Bluetooth keyboards.
It appears that 11.2.2 broke the ability to use the first-generation Bluetooth keyboards with the M1 Macs. I have not tried Intel Macs on 11.2.2 as I'm still running Mojave on my Intel Macs.
On the other hand I used a 3rd generation with Big Sur and Monterey until yesterday with no problems.