tmux only emits 24-bit colour sequences to the outer terminal if it believes that terminal supports them. The terminfo entries used for TERM inside tmux advertise 256 colours, so without an explicit declaration, applications such as neovim fall back to the 256-colour palette and themes look subtly wrong.
tmux 3.2, released in 2021, added the terminal-features option, which is the current mechanism: 'set -as terminal-features ",xterm-256color:RGB"', where the part before the colon matches the TERM value of the outer terminal. Use -as to append rather than replace the built-in list.
On tmux 3.0 and 3.1 the equivalent is 'set -as terminal-overrides ",xterm-256color:Tc"'. Both forms can coexist safely. Verify from inside tmux by printing a 24-bit SGR escape and checking that the colour is exact, or run neovim's checkhealth. Note that the outer terminal must genuinely support true colour; declaring RGB for a terminal that does not results in garbled output rather than a graceful downgrade.