I got this issue on 24H2 few days back. I simply swapped USB ports between Keyboard and mouse and now it's all good.
All clean installs. hp, lenovo, asus, msi, noname (desktops and laptops) As I wrote, it has the look and feel beeing completely random. Even if its the very same model/manufacturer, it did NOT happen on all of them. Hence I started googling and came up with the results of it beeing existing since may 2024. On the last 40+ installations it happened like 5 times. 2 of them on unsupported W11 hardware. 3 times on newer, W11 compatible hardware. I have never ever looked for "up to date keyboard and mouse drivers", except I had horrible issues. Especially older laptops sometimes only offer updates for the touchpad or the Fn keys. If its not under "optional" updates, I also never ever cared to look for "up to date" keyboard and mouse drivers, except its hillarious gaming equipment.
I had the problem with an HP Elitebook 840 G3, the mouse and keyboard stopped working after standby 24H2. Not installing the Conexant media driver 7/3/2018 offered in Windows Update and using the original driver from HP instead helped.
Your problem is probably that you don't have the right drivers for your computer. And by the way, the controllers must also be correct and up to date. From Microsoft You only get these drivers and controllers that are needed to get Windows to start after installation and these may not work perfectly with your system, usually they do not work as should, they are generic drivers only. However, if you use the drivers that came with the device, they may be outdated and not fully compatible with your system because the system is usually updated many times after the device was released. So try to install the correct drivers and controllers also.
i been having the same issue sense the last three canary release builds..... the keypad in my lenovo laptop works fine i shut down the machine and the next day it no longer types the keypad night light works .....so i know the keypad is working.....what worked for me i went into the device manager deleted the keyboard driver....rebooted and now is working..... but this most be done everyday each time i start my laptop i have to go into the dive manager delete the keyboard driver and restart and it works again ....for sure its a bug MS needs to look into....dont know if there even aware of it.
I will try to look for official and up2date (controllers) drivers on the affected machines, but the strange thing remains, that it happenes on 1 or 2 out of 10 machines (same model).
In this case, it's really a bit strange, but at the same time it suggests that there is a problem with these two, and it's quite difficult for someone else who doesn't see this machine in front of them to guess, what is it. So, all hope is that you yourself will find what causing the problem.