From time to time, the pincode does not work on an Android 9 phone. It claims that it is a wrong pincode, though the pincode shows up correctly in the display. It does not help to enter the pincode several times. After a few attempts it will start pausing for 30 seconds.
A reboot has so far help everytime, enabling me to login as well as get past the screen locker.
I know two other similar questions: Correct Password not accepted after being on a long time and Why doesn't pin code/pattern work?. In regard to the latter question, a comment (https://android.stackexchange.com/a/162977/280235) suggest checking apps permisions. I have gone through several of the apps, and I do not see that any have permissions in relation to screen locking. I believe it is the standard screen locker I have installed.