Search applications - which version

Well if your running random scripts who knows, fortunately since you care about the desktop entry not the “app” per se your looking at /usr/share/applications

Of course that will likely have hundreds of files in it but you should be able to find it as ${APPID}.desktop or the older-style ${APPNAME}.desktop. Of course working out which is new vs old is another matter

Really this is an issue for $vendor who are shipping their app weird, ask them to use flatpak (or whatever package format your distro might favour)