...announcer says "that was perfectly played on defense, and he still scored". Then they go on to talk about how the offensive player just made a better play - while emphasizing again that the defender did everything they could have done and it didn't matter.
You might be arguing about the semantics of whether or not you can consider it a good game defensively if the other guy keeps scoring. But if the defender was in the correct position and did everything within their power short of fouling to stop the offensive player from scoring - and the offensive player scored anyway - what more do you need from the defender in order to not say that they played badly?
Sometimes the other player, in this instance the offensive player, is just better.