Has something changed with Flatpaks?

I missed your latest reply.

It’s odd that on your system the $XDG_DATA_DIRS variable points to the home directory for the user kp rather than root’s home directory. Maybe someone else who installs flatpaks system-wide can confirm if that’s indeed the issue?

I’ve done a little more digging and as far as I can tell the variable should be set correctly automatically. Do you have the file /etc/profile.d/flatpak.sh on your system, and does it look like this?

# cat /etc/profile.d/flatpak.sh 
if command -v flatpak > /dev/null; then
    # set XDG_DATA_DIRS to include Flatpak installations

    new_dirs=$(
        (
            unset G_MESSAGES_DEBUG
            echo "${XDG_DATA_HOME:-"$HOME/.local/share"}/flatpak"
            GIO_USE_VFS=local flatpak --installations
        ) | (
            new_dirs=
            while read -r install_path
            do
                share_path=$install_path/exports/share
                case ":$XDG_DATA_DIRS:" in
                    (*":$share_path:"*) :;;
                    (*":$share_path/:"*) :;;
                    (*) new_dirs=${new_dirs:+${new_dirs}:}$share_path;;
                esac
            done
            echo "$new_dirs"
        )
    )

    export XDG_DATA_DIRS
    XDG_DATA_DIRS="${new_dirs:+${new_dirs}:}${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
fi