Ryan McLeod had a goal and an assist, Tage Thompson and Josh Doan each had two assists, and Ukko-Pekka Luukkonen made 20 saves for the Sabres (25-16-4), who are 14-2-0 since Dec. 9. Buffalo finished with just 14 shots on goal.
Sabres center Josh Norris left the game in the second period with an upper-body injury and did not return.
Owen Tippett and Trevor Zegras scored for the Flyers (22-15-8), who have lost four straight (0-3-1). Dan Vladar allowed two goals on five shots before leaving after the first period with an injury. Samuel Ersson stopped six of eight shots in relief.
Dahlin scored on the power play to give Buffalo a 1-0 lead at 9:30 of the first period, beating Vladar inside the left post with a snap shot from the top of the right circle.
Mattias Samuelsson extended it to 2-0 at 15:13 after receiving a pass from Noah Ostlund in the slot and snapping it in blocker side. The play started with Doan picking off Zegras’ pass in the neutral zone and sending it up for Ostlund.
Jack Quinn pushed it to 3-0 at 4:22 of the second period, burying a feed from McLeod, who was behind the net, under the bar from the right hash mark.
Tippett cut it to 3-1 at 10:28 when he carried the puck from the neutral zone to above the right circle and beat Luukkonen inside the near post.
Dahlin scored his second power-play goal from the high slot to extend it to 4-1 at 13:51.
Zegras scored on the power play to narrow it to 4-2 at 7:37 of the third period after Travis Konecny’s pass through the crease redirected off his skate past Luukkonen back door.
McLeod scored short-handed into an empty net at 19:20 for the 5-2 final.