Try to encrypt with a passphrase via keyboard and help of the NVDA screenreader:
In case of entering 2 different passwords in the pinentry there is no clear way forward.
For a seeing person it is (more or less) logical to display the entries via the "eye" button and then delete both or only the second password field and try again with a new entry.
The eye button issue is T7736: Pinentry: Show/hide button not accessible by keyboard.
Additionally one would need feedback on where the cursor is after closing the error window. This is not always given.
Maybe different text for screenreaders would be helpful here, too? The lines are currently prefaced by "Passphrase:" (first line) and "Repeat:" (second line), so if the location is given you hear only "Repeat".
Whether the whole password is selected or not in the field you are in is missing information, too. It would be helpful info as it indicates if the field will be overwritten when you start typing or not.