Ubuntu has switched Firefox from being a traditional package to being a Snap package – imagine it as a Docker container but for desktop apps. The container has a virtualized file system with its own /
(and therefore its own /tmp and everything else), only with /home mounted from the outer namespace.
To 'fix' it, find a way to install Firefox not through Snap – e.g. using the Mozilla .deb packages from their PPA repository (use the apt-preferences file if needed to prioritize the PPAs over the bad Ubuntu package), or by extracting the Mozilla-provided .tar.gz into ~/.local or wherever (it will auto-update like on Windows).