utking I have never built myself a package on FreeBSD but you could try these steps:
1) assuming that you have a working connection, install the GhostBSD building tools and download the ports collection:
sudo pkg install \-g 'GhostBSD\*-dev'
sudo portsnap fetch extract
2) move to the xlibre port directory and build the package adding the required flag;
sudo make -Dlegacy_nvidia_padding=true install clean
However, I don't think it will work because your model should be quite new to be in the legacy branch. Also, you should only need the ndvidia-drm-kmod driver, because RTX 40 is included in the supported hardware, but I am not sure which whether drivers are installed by default.
Just wondering, what is the content of your/etc/rc.conf?