Oneplus devices have a bug with device passwords. There are a number of community threads complaining about Device Passcodes not working
I also experience this on my OnePlus device. As mentioned in the linked thread, the workaround is to reboot the device any time you are told the device password fails. I have to do this every other time the phone turns on. I can't boot the device as the device passcode is constantly rejected as incorrect, and yet rebooting the phone any trying again will work first time.
Sadly this workaround fails for the scenrio you are describing, creating a new user profile will constantly reject the device password, rebooting doesn't resolve this for me in this scenario. What's especially annoying is, when cancelling out of the create new user screen, you are prompted for the device passcode to get back into your own account, and this works.
Unfortunately, there doesn't seem to be a solution to this other than the reports of factory resetting the phone solving the issue. I have personally put up with this for too long on multiple OnePlus devices and won't be buying OnePlus again.