This is just that kinda arc to be fair, Sanji is far from the only character that's getting clowned on.
Just a few off the top of my head:
- Kidd gets one-shot, whole ship is sunk
- Law gets beaten, most of the crew left for dead
- Garp fights for a few panels and though he shows some impressive attacks, he loses quickly
- Goofy doesn't defend Sentomaru
- Goofy, Zoro, Lucci, and Kaku can't damage Seraphim
- Kizaru can't pull himself together and is on depression tour
- Kuma waddles on screen and punches Saturn with decades worth of rage plus the instinct to defend his daughter, which gets negated two panels later when Saturn regens the damage no prob
- Vegapunk is the world's biggest genius yet been a total dumbass
- Goofy can't win against any of the Gorosei (his words), and is running for his life
And probably some more instances that don't immediately come to mind.
This arc has not been kind to many characters. At least Sanji got his attack in on S-Shark, and got the shock reaction from Lizaru, so it's not all bad for him.