Changing PS1 with shell integration breaks it:
Without shell integration everything works fine.
This bug occurs in zsh, but not in bash.