i'm trying out flatpak.
The only app I have trouble with is firefox.
After starting it, it creates 2 icons in dock. They both show the firefox logo but one is more blurry than the other.
The blurry one is the one with the blue point on it, indicating I have one instance running.
The sharp icon disappears a few seconds after starting firefox.
But when I right-click the blurry icon all I can do is close the window whereas I expect to see multiple options like "new window" and such. Likewise clicking this icon with the middle-mouse doesn't do anything.
This does not happen when installing firefox via apt.
I get one sharp icon that contains all the expected options upon right clicking.
This does also not happen with any different apps I installed via flatpak.
They all only create one sharp icon upon starting with the expected options upon rightlicking the icon.
I know it's an old question but it still happens on elementary OS 6.1 Jólnir. The answer by Leo S. here works but if you prefer more GUI approach, you can install MenuLibre. I got the same problem with Blender flatpak, and with this program it's super easy.
Search for the program,
open the Advanced Tab,
Look for the Startup WM Class,
There's a little search icon you can click to identify the window,