Reproduction: create two passwords: "a" 50 times, and "a" 51 times. For simplicity, call them a50 and a51. Paste a51 into password and confirm password fields and hit OK. Passwords will not match. Paste a50 into password and a51 into confirm password and hit OK. Passwords will match.
Please include the maximum supported password length in the documentation. Better yet, please allow the confirm password field length to match the password field length as well.