@jarkko Interesting. Fedora should have xdg-desktop-portal and xdg-desktop-portal-gnome installed and functional.
The official Element app seems to be bad at using dynamic permissions. Both attaching and uploading files doesn't use the dynamic permissions. Apparently it's a new bug in Electron, and this used to work: https://github.com/electron/electron/issues/43819
I'm guessing you don't use many other Flatpaks then? I'm surprised you've never run into the dynamic permission prompts. It's just like on iOS