Kris Letang and Connor Dewar also scored for the Penguins, who are the No. 2 seed from the Metropolitan Division. Arturs Silovs made 25 saves.
Silovs got the call in place of Stuart Skinner, who started the first three games of the series. It was Silovs' first Stanley Cup Playoff game since Game 7 of the 2024 Western Conference Second Round with the Vancouver Canucks against the Edmonton Oilers.
Denver Barkey scored his first playoff goal, and Travis Konecny also scored for the Flyers, who are the No. 3 seed from the Metropolitan. Dan Vladar made 17 saves.
Philadelphia leads the best-of-7 series 3-1. Game 5 will be at PPG Paints Arena in Pittsburgh on Monday (7 p.m. ET; ESPN, SN, TVAS).
Crosby put the Penguins ahead 1-0 at 14:24 of the first period with a power-play goal. On the ensuring face-off after Barkey was called for high-sticking, Crosby won the puck back to Erik Karlsson at the left point, then one-timed a return pass from the hash marks off Vladar's glove.
Rakell made it 2-0 at 1:03 of the second period. Vladar lost the puck in Rakell's skates behind the Philadelphia net, and Rakell dove in front to backhand it into an open net.
Barkey got to the front of the net and one-timed a Trevor Zegras centering pass to make it 2-1 at 15:40.
Letang made it 3-1 at 4:27 of the third period. With the teams skating 4-on-4, Crosby pulled a puck off the boards on the left side of the Flyers zone and kicked it to Letang, who skated between the circles and scored on a slap shot through a Crosby screen.
Konecny buried a one-timer from the right face-off circle to make it 3-2 at 7:03.
Dewar scored on an empty net for his first career playoff goal and secured the 4-2 final at 19:03.