The -X creates its own DISPLAY env var, which works fine:
$ uname -s
FreeBSD
$ ssh -X purism@192.168.178.59
Linux pureos 6.6.0-1-librem5 #1 SMP PREEMPT Mon May 6 16:09:52 EDT 2024 aarch64
The programs included with the PureOS system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
PureOS comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Jun 2 09:42:48 2024 from 192.168.178.22
OK
inhibiting suspend ...
purism@pureos:~$ env | grep DISPLAY
DISPLAY=localhost:10.0
purism@pureos:~$ xterm
brings up the window of xterm in my KDE-plasma on FreeBSD fine.
To elaborate on that: With that option X is automatically forwarded back over the secure SSH connection. So it basically should look like a local display / display connection at both ends.