BTW there is an open PR at the flatpak/xdg-desktop-portal site to allow such a communication by default.
For more information I refer to:
There is also a workaround similar to mine here that is updated and uses a better wrapper script.