I found a fix that works for me at ssh - X11 forwarding works for some progs, other progs ignore $DISPLAY? - Unix & Linux Stack Exchange. I added to ~/.bash_profile
this section:
if [ "$SSH_CONNECTION" != "" ] && [ "$DISPLAY" != "" ]; then
export GDK_BACKEND=x11
fi
Thanks to @jlehtone for their suggestions. Hopefully this will save others time in future.