Why does F4 not work in MacOS X (Touchbar macBook, or macBook Air)?
I have seen elsewhere that some key combos stop working until you reinstall iTerm2. If you have homebrew and cask installed, you can use brew cask reinstall iterm2.

(I'm so unsure about the efficacy of this that I would have posted it as a comment, but I can't comment yet)