TL;DR
.desktop that runs a snap installed Chromium with --app flag keeps opening new windows instead of focusing the window if it's already open.
Full story
I'm trying to replace the Electron-based desktop Teams-for-Linux application with a website run in Chromium on Ubuntu (Gnome). I opened https://teams.microsoft.com in Chromium and using the dot-menu -> more tools -> create shortcut created a *.desktop file. This file has the following exec line:
Exec=/snap/chromium/2319/usr/lib/chromium-browser/chrome --app=https://teams.microsoft.com
I moved that desktop file to ~/.local/share/applications and added it to Dash.
The issue is whenever I click this Teams shortcut in Dash it opens a new window of Teams and a new icon appears in Dash. It opens a new instance each time.
I had similar issue with YouTube Music Desktop some time ago and it also was distributed through snap so I'm guessing it's somehow related.