Firefox shows 2 icons in the dock on startup

hi, I installed the Firefox ESR by modifying the configuration.nix file as shown below

firefox = {
  enable = true;
  package = pkgs.firefox-esr;
};

before I was using

firefox.enable = true;

Problems I was facing with Stable version of firefox before switching to ESR:

  • Frequent freezes and crashes when opening up a lot of tabs

Problems I’m facing with ESR:

  • 2 icons for some reason in the dock on startup
  • First icon:
    • Is clickable
    • Opens up new Firefox Window
    • Disappears after about a few secs (At least 10 secs)
    • Adds another icon inside the dock if it isn’t already present
  • Second icon:
    • Icon is blurry
    • Main Firefox icon which we can use to like the general Firefox dock icon