The only two things I might suggest are first, if you have another set of numbers on the keyboard, try those.
If that doesn't help, uninstall the Bluetooth driver and reinstall. When I uninstall a driver, I use the Device Manager and uninstall the device and check the box to uninstall all drivers. If you have a driver available to reinstall, you may want to do this while offline.
When the passcode window disappears early, is the LED still blinking colors? Are you taking too much time to hit the enter key?
My keyboard is an HP K4000 which seems to be very reliable. It may also be a problem with your Bluetooth device in Win 10.
Sorry I don't know a way to disable the passcode since it is used to assign that keyboard to only one machine.. You do only have the one system you are trying to pair with?