Sanji wasn't detecting the shot from the priest but his intent to shoot, and he did in fact shoot as he was hit by the jellybean, so the cook had to recalculate his move in less than a second and jump from dodging a priest that was next to him to dodging the counter-attack of a first commander that sees into the future that was far away from him among the crowd.
Before Katakuri decided to change the future he saw, Sanji only had to deal with the intent of one attacker, but then he suddenly had two intents aiming at his head (one from a character way stronger than him that specializes on the very ability he needed to display in order to survive). The fact that Katakuri himself is surprised by how he dodged his jellybean too is pretty much an undeniable support for how remarkable the feat was; I doubt Oda would draw the commander like that if it wasn't.