Context: pkgforge-dev/ghostty-appimage#93 (comment)
This is actually a bug in mesa though, but would be great to make sure the nvidia prop driver gets loaded first to avoid this from ever happening again.
Putting the nvidia driver first in __EGL_VENDOR_LIBRARY_DIRS would do the same as what I suggested of removing AppDir/share/glvnd.
For this to be done sharun would need to check if /usr/share/glvnd/egl_vendor.d/10_nvidia.json is present then give priority to it.