Jonas Vingegaard (Jumbo-Visma) edged a three-way breakaway sprint to win Stage 6 and move into the overall lead at the Tour of Poland.