UHK v1 is occasionally not detected by MacBook Pro

I have two MacBooks that I switch the keyboard (and rest of my setup) between them when I want to switch from work to personal laptop.

I have a wireless mouse that after connecting the cable to each laptop I use to wake the laptop up (so the screen turns on and I see the login page).

The problem is that the keyboard is not turning on occasionally and I need to open the MacBook lid and login by typing my password on the laptop keyboard. After logging in UHK is detected and its light turns on.

Anyone has any idea what might be the cause? (I am using a UHK v1 with latest firmware).