Appimage builder, if system variable is not set or empty, should set its value to /usr/local/share/:/usr/share/ (system path, not bundled path), before changing its value the way it does in _configure_runtime_environment() to refer bundled paths as well. This way bundled apps will receive path to system directories even if XDG_DATA_DIRS is not set/empty.
XDG spec states:
Appimage itself doesn't seem to do that: https://github.com/AppImageCrafters/appimage-builder/blob/main/appimagebuilder/modules/setup/apprun_2/apprun2.py#L157-L187
Appimage builder, if system variable is not set or empty, should set its value to
/usr/local/share/:/usr/share/
(system path, not bundled path), before changing its value the way it does in_configure_runtime_environment()
to refer bundled paths as well. This way bundled apps will receive path to system directories even if XDG_DATA_DIRS is not set/empty.