It's estimating one's own ability at performing a task - not "confidence" in a personality sense.
Someone can estimate their own ability at something at 0 and because of their own confidence and determination, they - to your point - may outperform a less confident person who also estimates their ability at 0.
The point of the study was that those who estimate their ability higher generally performed worse (regardless of confidence, impulsiveness, which we more broadly attribute to general "confidence" in personalities).
Simply: Anytime anyone overestimates their ability, they will perform worse than if they had approached it with humility (on average).
Rather than speaking it like people “have Dunning Kruger”
Just a fact (heuristic) of behavior that anyone can fall subject to