Let's assume that I have 2 workspaces and Chromium is pinned onto the dock:
On workspace 1, I open chromium.
When I go to workspace 2, Chromium should not be shown as open since I opened chromium earlier on workspace 1.
In general the desktops/workspaces should only show the applications that were opened on that desktop/workspace.
In KDE, there's an option to "Show only tasks from the current desktop" which does what I have described above. It would be really nice if this enchantment was added to the dde-dock too!