It also happens when the hosts file is messed up and the system can’t resolve its own hostnames. Opensuse used to be pretty notorious for doing something odd to the hosts file by default that really only affected Firefox.
Edit: the increased security they’re trying around the browser might also be triggering that local resolution issue
Listen to the parent, this is almost certainly something to do with DNS (i.e. Firefox is not getting an answer for some reason, then timing out, then using maybe a backup DNS server; maybe there are multiple rounds of this). Who knows how your distro and that flatpak produce this interaction, but something is going on there.