I wasn’t sure about this, so I did a bit of web searching and unearthed [HOW TO] Run Firefox *and* KeePassXC in a flatpak and get the KeePassXC-Browser add-on to work - #3 by jro - Flathub Discourse. It looks like a complicated situation.
Ultimately it may be up to Firefox to fix: 1621763 - [flatpak] Support native messaging