Well, technically he outlasted him and Luffy was also injured but I can see your point.
Doflamingo did technically win this round through attrition.
But I think this is more about showing the biggest flaw in Gear 4 in the over all scheme of things. It gave Luffy the power to completely over whelm Doflamingo but it has a time limit on how long it lasts and it leaves Luffy helpless at the end of that time limit.
This fight actually reminds me of the Crocodile battle, got defeated twice and survived because of flukes before beating him in the final round.