The icon that you see when the application is not pinned is the window icon. When it is pinned, the application icon is used instead. Go to the project properties and set the icon on the "Application" tab (this, of course, should be the same icon used for the main window to avoid confusion).
source
share