My application is in the selected taskbar(GNOME, dash-to-panel). When a window opens, a new icon appears in the taskbar. How to make so that the favorites icon is activated and a new one does not appear (as in other applications: Gedit, Nautilus)
Answer: Need a correct StartupWMClass entry. Find entry: in a terminal xprop WM_CLASS
Sounds like you don't have a launcher, in GNOME environments usually a .desktop file. This file tells the desktop which kind of application your app is, allows you to create right-click actions (such as New Window, New Private Window, etc.). Here is an example:
There is a good guide by GNOME here.