Conclusion This fix resolved my issue, allowing the Home and End keys to function correctly inside tmux. The problem was caused by tmux modifying the escape sequences sent to Vim. By tweaking tmux’s terminal-overrides and adjusting Vim’s key mappings, I ensured that both tools handled key inputs properly.
Now, Vim behaves consistently whether I'm using it inside or outside tmux, making my workflow much smoother.