Built images are not respecting XDG spec when it comes to default XDG_DATA_DIRS issue
XDG spec states:
If $XDG_DATA_DIRS is either not set or empty, a value equal to /usr/local/share/:/usr/share/ should be used.
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.
Agreed this is affecting my app as well.