If you are using the Icons-only Task Manager widget, e.g in a floating Plasma Panel, size 56px, width or height set to “fit content” and with the “Dodge windows” setting as a dock replacement:
right click → Configure Icons-only Task Manager… → Behaviour → Show only tasks: → deselect all
IMHO this setting in the Icons-only Task Manager widget should be the default…
I also suggest to set the → Appearance → Spacing between icons: → to Small in the Icons-only Task Manager if you additionally put widgets like the Trash widget or the Calculator widget into the “dock”.
Using and tweaking the Plasma Panel as a dock replacement is not perfect yet, but I think the KDE team might be working on it and the Plasma Panel already has gotten better in this regard in Plasma 6 compared to Plasma 5.x …
If you are a developer, perhaps you will have fun working on the “small” things like mentioned here instead of working on a completely new dock:
A medley of (non-critical) bugs in Plasma 6 that I have encountered