Taskbar shows windows from another workspace

I’ve two workspace active and my taskbar shows windows from another workspace. I need to hide it, is there a setting that can do this?

The alt+tab switchers seems to get this fine and not show windows from another workspace.