An application that you wrote and registered your own desktop file may be like this ↓
All you have to do is get the class name for this app and specify it in your desktop file.
Start the application you want to check.
Hit this command
$ xprop WM_CLASS
If all goes well, the class name will be output as shown below.
WM_CLASS(STRING) = "gravitdesigner", "GravitDesigner"
Open the desktop file of the target application and open it.
$ sudo vi /usr/share/applications/gravit-designer.desktop
Add the ↓ line
StartupWMClass=GravitDesigner
GravitDesigner
is the class name you just looked up.
That should improve!
By the way, this design software called Gravit Designer is used as a transfer destination from Adobe Illustrator. it's recommended.