Confirmed by who? By you?
Equally damaged with Doffy having his internal organs burnt.
I do believe G4 Luffy was "stronger than Doflamingo", because Doflamingo being badly injured doesn't excuse a cutting attack from him not piercing Luffy's hakified rubber body, but Luffy would 100% lose to him if they fought again a second time back then... because he was incapable of finishing off a half-dead Doflamingo off before G4 ran out, and he needed to be protected with no strength left for 10 minutes straight.
Katakuri had to pierce his own stomach with his trident, making a much bigger wound than Luffy had. Cracker faced Luffy in a 1 vs 2 with Nami severely nerfing him. Kaido went through a gauntlet and took some serious attacks before Luffy finally put him down.
Yes, it can be argued Luffy is not stronger than the people he defeats, that's precisely why the plot finds ways to weaken them. He does surpass them all eventually, but this is all a way to make his wins more believable since he's jumping power levels too fast.
But yeah, Doflamingo is YC3 at best, despite all that. An actual YC3 Cracker could actually injure G4 with a sword.