With synchronize-panes or a quick pane switch, it is easy to type into the wrong place. For a pane that runs something you don’t want to disturb, you can switch its input off.
tmux select-pane -d -t 2
Pane 2 keeps running and keeps printing, but tmux drops every key you send to it. To turn input back on:
tmux select-pane -e -t 2
Without -t it applies to the current pane, so Ctrl-b : and select-pane -d works too. Then you notice that you can’t type your way back out, which is why I’d keep a key for each:
bind P select-pane -d
bind O select-pane -e
The prefix keys still reach tmux, so Ctrl-b O unlocks the pane you are in. To check whether a pane is locked, ask for #{pane_input_off} with display-message -p; it prints 1 when input is off.
It only blocks input. The program in the pane keeps running and printing, and Ctrl-b x still closes the pane, so it guards against typos rather than against you.
Further reading: tmux manual page (OpenBSD)