Sometimes when opening apps I get duplicate icons in the Dock for that app. This isn't really a problem, however I'm curious why macOS does this (I suppose this is more of a technical question).
This happens a lot especially with VS Code where I often launch the app with the code
utility in the Terminal.
Why does macOS think these are different apps when they're the same binary?
Show recent applications in Dock
checkbox checked in System Preferences > Dock? – IconDaemon Feb 24 at 0:19