To get Gnome-Shell to correctly detect that an application is already running I need to specify the StartupWWClass in the desktop file. On X11 this is easy to get using xprop (to get WM_CLASS), but on Wayland I cannot find a way to get this information (called in Wayland the application ID I believe). Is there a way to get it?
PS: I'm aware that in general Wayland doesn't allow getting information about other apps like X11 did. However, this information is not particularly sensitive, so I figure either Wayland or Gnome-Shell (the compositor) may have made an exception for this identifier to allow people to determine what applications call themselves and which applications are running.