tests/login/*.exp turn on the conservative mode
In modified files [0] we can find a note that the
Expect script is time-sensitive when combined with
number of programs (e.g. ksh), and to discard or
ignore keystrokes that come "too fast" after
prompts after prompts.
The solution is to use the conservative mode.
[0]: https://src.fedoraproject.org/tests/shell/blob/main/f/tests/login/ssh.exp