This just happened to me this morning, after clicking on a couple of links in a message in Thunderbird.
After setting Focus Stealing Prevention on Firefox' window from "Normal" to "High", this behavior stopped.
But unfortunately, with "High" now I occasionally get password prompts or similar dialog box which pop up behind firefox, and can easily be missed.
This just happened to me this morning, after clicking on a couple of links in a message in Thunderbird.
After setting Focus Stealing Prevention on Firefox' window from "Normal" to "High", this behavior stopped.
But unfortunately, with "High" now I occasionally get password prompts or similar dialog box which pop up behind firefox, and can easily be missed.