The general correct way to handle this (which works through tunneled SSH as well, e.g. host -ssh-> server A -ssh-> server B) is with OSC52 xterm escape sequence. What happens is the app (in this case tmux or, say, neovim, with the osc52 plugin) will emit a OSC52 sequence copy buffer, if your terminal advertises it, and then your terminal will automatically assign that to the clipboard on your local host. Note in this case the escape sequence and its payload will travel transparently through the SSH session. the escape sequence takes care of preventing the conntent of the buffer however long it is from cluttering or corrupting your terminal output.
See tmux's manpage doc:
set-clipboard [on | external | off]
Attempt to set the terminal clipboard content using the xterm(1) escape sequence, if there is an Ms entry in
the terminfo(5) description (see the TERMINFO EXTENSIONS section).
If set to on, tmux will both accept the escape sequence to create a buffer and attempt to set the terminal
clipboard. If set to external, tmux will attempt to set the terminal clipboard but ignore attempts by
applications to set tmux buffers. If off, tmux will neither accept the clipboard escape sequence nor
attempt to set the clipboard.
Note that this feature needs to be enabled in xterm(1) by setting the resource:
disallowedWindowOps: 20,21,SetXprop
Or changing this property from the xterm(1) interactive menu when required.