There's a distinct difference between the control sequences issued by Windows ssh.exe (OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2) vs. the RHEL 9 ssh (OpenSSH_8.7p1, OpenSSL 3.0.7 1 Nov 2022) when establishing a session to a Linux host.
Windows ssh issues the following for the Home/End keys:
^[OH - Home
^[OF - End
Linux ssh issues these:
^[[1~ - Home
^[[4~ - End