Its even worse when you force Firefox to use wayland its icon doesn’t even show.
Edit: Oh since everyone now is confused; I only have the flatpak version of Firefox installed yet it doesn’t use the pinned icon and doesn’t even use the firefox icon under wayland at all.
Flatpak is a last resort. Only used when the package is not available on the repository or the version is too out of sync with the environment. If I really really need to run the latest version of that software, it’s easy to run a Flatpak. But that is only and exclusively for final user software, never for services or background running application, or a new can of worms is opened.