If you run an SSH client process to connect to an SSH server, the resulting SSH session will not inherit the environment from the parent process of the client by default. Although not the same, connecting to a tmux server is more similar to that than starting a regular child shell.