You get that people’s dreams aren’t the only thing that someone can be motivated by right…
Let’s see CoC users who put other things above their dreams:
Oden - Wanted to open wanos borders but instead chose to get his citizens out of Wano after Kaido and orochi took over
Ace - Wanted to see Whitebeard as the pirate king, but chose his crewmates life over his own the entirety of Marineford
Zoro - Wanted to be the WSS but when choosing between his dream and Luffys, he chose to sacrifice his and his life.
Sanji in WCI was given a choice of his life or the lives of those he cherished, he chose his like the other CoC users mentioned above.
At no point did Oden give up on opening the border. Ace chose to avenge Thatch because of Whitebeard's reputation. He faced death at the hands of Blackbeard and mentioned his dream, seeing Whitebeard as PK. They didn't accept those things not happening. If Sanji mentioned seeing All Blue with Pudding sure, but he didn't.
Ace died because he stopped to fight Akainu for shitting on Whitebeard and there by insulting his dream. I bet if Queen said something about the All Blue Sanji would just flip a bird and keep running.
Zoro's dream is intertwined with Luffy's. When Mihawk asked him about it in 3D2Y, his answer was seeing both come true. He specifically said that he wanted to be trained to surpass Mihawk in order to see Luffy's dream come true. With Kuma, it was his life or their dreams, which was why he had to sit Sanji down.
Sanji would have gladly chose to pay the price of just his own life, as he did many times in the past, including alongside Zoro in TB.
Problem in WCI is that Sanji needed to be alive and make a sacrifice through the wedding and the role he was supposed to play going forward to keep Zeff alive.
Sometimes things are not as simple as just you dying and then everything works out nicely for the ones who matter to you.
Again, it wasn't making a temporary sacrifice. His dream was defeated. He was like "shucks Luffy can go become PK without me."