After a brief descent, the riders faced the Verrogne climb, where Rex concluded his duties and pulled off.
Vingegaard maintained a strong position with four Visma teammates ahead, while Eulalio closely followed the pace.
Giulio Ciccone attempted to drive the breakaway forward in search of his first stage victory of this year's race.
However, the breakaway held a lead of just over two minutes at the start of the final 16.6km climb, which proved insufficient.
The reduced peloton containing the overall contenders systematically caught the breakaway riders one by one on the final slopes.
Eulalio fought to maintain contact but lost the pink jersey on the winding roads to Pila.
Despite dropping back, Eulalio defended his podium aspirations and retains a 24-second advantage over third-placed Gall in the general classification.
>>> Lyonnes Face Barcelona in Women's Champions League Final
The Grand Tour continues on Sunday with stage 15, a 157km route from Voghera to Milan.