One possible explanation is that zsh is in vi mode when run from within tmux instead of emacs mode, the one where ^P/^N go up and down like in emacs.
zsh is in emacs mode by default unless bindkey -v (tcsh-style) or set -o vi (ksh-style) is run to switch to vi mode or the $EDITOR or $VISUAL environment variables contain vi.
Run:
bindkey -lL main
To check which one is in effect.
Example (with -f to skip loading the ~/.zshrc):
$ zsh -f here% bindkey -lL main bindkey -A emacs main
$ VISUAL=elvis zsh -f here% bindkey -lL main bindkey -A viins main
(the main keymap is Aliases to emacs the first time (default), but to viins (vi insert mode keymap) when $VISUAL contains vi).
In your case, maybe your tmux conf sets the $EDITOR or $VISUAL variable or your zsh config runs bindkey -v when it detects it's running inside tmux.
In any case, adding bindkey -e to the end of your ~/.zshrc would make sure you get emacs mode.
tmuxon my Ubuntu 20.04 machine, rantmux, and pressed Ctrl-B followed by ? (the question mark), it showed me the "key bindings" configured in my 'tmux'. I.e., the keystrokes thattmuxwill catch and the actions it takes for each keystroke. I then pressed the Q key to exit that display. Mytmuxcatches the Ctrl-p and Ctrl-n keystrokes and seems to send up arrow and down arrow keystrokes to the shell/application. Perhaps yours does this too. If so, you may want to change yourtmuxconfiguration for the keybindings on those two keystrokes.