Xdg-desktop-portal missing environment variables on startup

Hello, I noticed recently that some of my flatpak apps were unable to open URLs in my default browser (Firefox) when they previously had no problem a few months ago. After browsing various issues (here and here), I determined that it’s because the xdg-desktop-portal that is launched on startup seems to be missing the DISPLAY environment variable (and indeed quite a few other environment variables looking at the output of strings /proc/$(pidof xdg-desktop-portal)/environ). This can be seen from the error messages when I try and click on a URL (e.g. in the Thunderbird flatpak) in journalctl --user -xe

Sep 30 14:14:44 framira firefox.desktop[151303]: Error: no DISPLAY environment variable specified

I can solve this problem be restarting xdg-desktop-portal using

systemctl --user restart xdg-desktop-portal

but it’s a little annoying to remember to this after clicking on a URL in a flatpak app and realising it hasn’t opened.

My question is, is there a way to get the environment correct for xdg-desktop-portal on startup without having to manually restart (or in particular, just the DISPLAY environment variable).

My system is as follows:

Operating System: Fedora Linux 38 (KDE)
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Kernel Version: 6.5.5-200.fc38.x86_64 (64-bit)
Graphics Platform: Wayland

and I have the following xdg-desktop-* packages installed:

xdg-desktop-portal.x86_64         1.16.0-3.fc38   @fedora
xdg-desktop-portal-gtk.x86_64     1.14.1-2.fc38   @fedora
xdg-desktop-portal-kde.x86_64     5.27.8-1.fc38   @updates