Sam Steel broke a tie midway through the third period, and Jason Robertson and Miro Heiskanen also scored for the Stars (19-5-5), who have gone 7-0-2 in their past nine. Wyatt Johnston had two assists, and Jake Oettinger made 16 saves.
Collin Graf scored for the Sharks (13-13-3), who lost their second in a row after alternating wins and losses in their previous eight games. Yaroslav Askarov made 20 saves.
Jeff Skinner returned for San Jose after missing the past 10 games with a lower-body injury.
Robertson’s power-play goal gave Dallas a 1-0 lead at 14:20 of the first period when he backhanded in a rebound from the left side of the net. It was his 15th goal in the past 13 games.
Graf tied it 1-1 at 8:23 of the second period, capitalizing on a rebound in a net-front scramble.
Steel gave the Stars a 2-1 lead at 10:56 of the third after he poked in his own rebound from the right of the goal.
Rantanen extended it to 3-1 at 16:39 on a shot from the bottom of the right face-off circle into the far upper corner of the net.
Macklin Celebrini appeared to score at 17:20 to bring the Sharks within one, but the play was overturned after the Stars successfully challenged for offside.
Heiskanen scored into an empty net at 17:41 for the 4-1 final.