Greetings,
Welcome to the forum.
I am not a HP employee.
I am trying to wrap my head around your problem. Can you use the keyboard to enter the HP Startup Menu?
HP Startup Menu:
Tap "ESC" at system startup.
Select "F10"; BIOS Setup.
Tell me if this is what's happening.
You start your PC.
The Lock screen appears but the mouse and keyboard are nowhere to be found.
How are you getting to the Windows Recovery Environment (WinRE)?
WinRE images:


Try a Startup Repair. Or select Command Prompt. Then run the system File Checker.
Enter the following command, without quotes, "sfc /scannow".
I have never seen this problem. USB devices should always work or not work at all if you have a hardware problem.
Try connecting both devices to different USB ports.
Regards