Id recommend just starting off with using `Enter: “{{ passphrase}}”
The (?i) indicates a case insensitive search, and the parents around ^ are unnecessary, and the can be problematic as sometimes expect sees a \n or a space as the first char.
The expect module has the ability to respond multiple times to a single expected string, so instead of defining the expected string 2 times, you define it once, but give it a list of responses. Such as: