For flatpak, using the application called flatseal, check if your browser has the right permissions.
Under the section Filesystem and subsection Other files check if the following shows:
xdg-run/pipewire-0
If not, add it and see if this fixes your issue.
Use the following button to add the permission: