As shown in Chapter 998, Luffy and Jinbe never sensed what Sanji did and Luffy implied if his Haki was better he would’ve sensed something.
Many people refer to any positive Sanji praise in the manga as a “gag.” But even humor has a thread of truth in it.
Consider the following scene.
Sanjji detects a woman in danger. He fies off, and he saves her. Zoro detects the danger too, but Sanji’s got it.
Another scene; there’s a pretty lady in danger. All three Observation Haki Users sense it.
Another scene; Oda uses the same effect to show Sanji dodging Katakuri and Luffy dodging Flampe with high-level Observation Haki (and Vivre Card uses this as the Hero image for Observation Haki)
So when it comes to this scene, why is it so hard to believe Sanji’s Observation Haki is just better than Luffy’s at a base level?
There’s a set up.
Sanji asks Luffy and Jinbe if they can sense something. They can’t.
Later, Luffy asks where Sanji went. The page is structured the same, however, unlike Zoro, Jinbe and Luffy have no idea.
There’s a gag here in that it’s funny that Sanji fell into a woman’s trap by being hyper-focused, but that doesn’t mean the abilities that let him be hyper-focused don’t exist.
One Piece has gags and jokes, we all know that. Just because it’s funny doesn’t mean it didn’t happen. Furthermore Sanji is stated to be Observation Haki Specialist among the Straw Hats and is the Straw Hat who consistently uses Observation Haki on panel the most.