I have very recently begun to see this bug; A workaround is that if you start a new Firefox from a shell on your desktop, then running “firefox” from a shell, even a different shell window, will work fine. I haven’t been able to find out why.
You cannot start FF from the Desktop and then start new windows from a shell.
Unless that shell was directly started from the desktop.
So it must have something to do with the environment or process tree.