I suddenly get tray icons for some programs that are not running. I have seen this with (at least) Firefox and Telegram.
If I right-click them, it offers to quit the program. If I left-click one, it starts the program. Once the program is running the icon disappears.
Selecting the quit option does nothing. To hide them without starting them, I have to enter the settings for the system tray and pick never show (disabled) for their entries.
I have seen this happen with flatpak apps.
I use zen browser, its a flatpak, and when I launch the app it usually pops up the icon in tray, once the app is open the icon disappears.
This also happens with other flatpak apps.
I dont know how to disable it, but if you wanna hide it (like a temporary solution), then you can open the system tray drawer, which is a > icon on the last position.
There you can find a pencil edit icon at top right corner where you can choose what to disable, only show when relevant, hide forever etc.
Remember this menu will only display the firefox item if the icon is currently showing in the system tray, if it disappears then it’ll not be in that list.
As for what is happening, I think some kind of process in backend is pinging firefox or firefox itself has some sort of a background timer or something running for notifications etc…
Which is telling the system that firefox is running in bg, hence DE showing the icon.
Its probably a convinience thing that the DE is giving you an option to quit the app because no window exist (of the app) to quit it.