Beauvillier tied it with his first NHL goal at 9:39 of the second. The 19-year-old took a pass from Josh Bailey and swatted his own rebound past Dell to make it 1-1.
Lee gave the Islanders their first lead of the game 2:10 later when he took a nice feed from Jason Chimera and roofed a shot from the slot over Dell. It was Lee's first goal of the season.
The Sharks tied it when Hertl scored with 1:57 remaining in the second period, redirecting a cross-ice feed from Thornton past Halak to make it 2-2.
"It's not a pattern that concerns me," Islanders coach Jack Capuano said of allowing goals late in periods. "I haven't coached a team in the last three or four years that I've seen a team give up more goals after we ice a puck. We dominate a shift, and then we ice the puck, and then it's in the back of our net.
"To me, you've just got to be smart in managing the puck. We had them on their heels, they couldn't change, and we ice the puck and have a defensive zone faceoff, and it's in the back of our net."
New York was unable to capitalize on a power play with 1:06 left when Pavelski accidentally shot the puck over the glass for a delay of game penalty.
"It's just commitment level," Pavelski said. "It wasn't there (Monday) night, it was there tonight. You saw they're a dangerous team, they've got some skill and we didn't give them the odd-man rushes that they sometimes create."