I think there is bug in firefox binary installed using apt/snap, I faced same issue when I installed firefox from apt package respository. I solved this by downloading firefox from official mozilla source and symlinked binary to /usr/bin/firefox/
First remove firefox from you system.
apt remove firefox
Download firefox from official source. (You may need to replace download URL)
wget https://download-installer.cdn.mozilla.net/pub/firefox/releases/116.0.3/linux-x86_64/en-US/firefox-116.0.3.tar.bz2
Extract downloaded archive to location you want. I am using opt to extract archive.
tar -xf firefox-116.0.3.tar.bz2 --directory /opt/
Then symlink firefox binary to /usr/bin
ln -s /opt/firefox/firefox /usr/bin/firefox