The National League West-leading Dodgers swept the NL Central leaders, outscoring them 14-3 in three games. The Dodgers had their 12th shutout of the season.
"It feels good to help the team win and scratch a run across for them and the pitchers did the rest," said Barnes, the backup catcher who plays sparingly.
Lynn allowed four hits in seven innings, struck out three and walked one. Burnes gave up two hits in seven innings for his sixth scoreless outing of the season. The right-hander struck out nine and walked two.
The Brewers had the tying run in scoring position in the ninth. Phillips issued a two-out walk to Sal Frelick, who stole second as part of a career-high three steals on the night. But Willy Adames went down swinging to end the game.
The Dodgers improved to 15-1 in August and have won 10 in a row at home. They have outscored the opposition 93-38 this month.
"It's nice to win a game where you can prevent runs," Dodgers manager Dave Roberts said.
Barnes homered for the first time since Sept. 20, 2022, sending a pitch by Joel Payamps (4-3) into the lower seats in left. He singled in the third for his first multihit game of the season.
"I've always taken pride in not taking my offense no matter what over to the defense, but it's been a grind this year," Barnes said.
In the third, Burnes was called for a balk. He backed off the mound to throw to first and faked then went to second where the balk was committed and Barnes was safe.
The Brewers had runners at first and third with no outs in the sixth. William Contreras grounded into a fielder's choice to Lynn, who hesitated before throwing to the plate. Barnes chased down Christian Yelich at third and tagged him for the first out.
Yelich robbed Mookie Betts of a potential leadoff double in the sixth, racing to make a diving catch and sliding to a stop on his belly.
The Dodgers' defense sparkled for the second straight game. After turning three double plays Wednesday, they had two more in the finale.