Dodgers, Yankees: After three intense games between the Yankees and Dodgers in front of sellout crowds, Oswaldo Cabrera allowed himself to think ahead. “It crossed in our minds this can be a good matchup in October,” the Yankees utilityman said. The Yankees beat the Dodgers 6-4 on Sunday night to avoid a three-game sweep as Trent Grisham hit a go-ahead, three-run homer in the sixth inning off Tyler Glasnow. Aaron Judge and Cabrera also homered for the Yankees, who have the American League’s best record at 46-21 (through Sunday). The Dodgers, who won the opener 2-1 in 11 innings and 11-3 on Saturday, top the NL West at 41-26. “Playing with this media attention, sold out, the energy — you feel it — a team that you potentially could meet in the World Series, is sort of a barometer,” Dodgers manager Dave Roberts said. There have been 11 Yankees-Dodgers World Series meetings — four more than any other matchup — but none since 1981. Since Major League Baseball started interleague play in 1997, the teams have evenly split 22 regular-season games. “You’re watching two really good teams out there, but it’s a long way to go,” Yankees manager Aaron Boone said. There were five former MVPs on the field in the Dodgers-Yankees series: Shohei Ohtani, Mookie Betts and Freddie Freeman for the Dodgers, and Judge and Giancarlo Stanton for the Yankees. Ohtani went 2 for 13 with one RBI, Betts 3 for 12 with two RBIs and Freeman 2 for 10 with two RBIs. Stanton was 0 for 14 with seven strikeouts and Judge 7 for 11 with three homers and five RBIs — giving him eight homers in 10 career games against the Dodgers. “Judge is a man among boys,” Roberts said. With the Dodgers in the Bronx for the first time since 2016, the three games drew 144,445 and doubled the Yankees’ home sellouts this season to six. “Our fans are excited. I think that’s the biggest thing I noticed,” Judge said. “From the very first pitch all the way to the ninth inning, fans are out there screaming, yelling.” Juan Soto missed the series because of left forearm soreness, but he was in the lineup as DH on Monday night against the Royals in Kansas City. In his first season since the Yankees acquired him from the Padres, Soto was hitting .318 with 17 homers, 53 RBIs and a 1.027 OPS. Judge was batting .305 with a major league-leading 24 homers, 59 RBIs and and a big league-1.139 OPS. “A lot of the hype was coming from the outside. Inside we’re just playing ball,” Betts said. “A lot of things that we have to fix — situational hitting, I think that’s one of the main things. Just making sure we’re playing the game the right way and doing everything the right way because come postseason time we’re going to have to execute those things.” The Dodgers were 7 for 30 with runners in scoring position over the three games and the Yankeers were 3 for 21. The Yankees lead the major leagues with a 2.90 ERA and the Dodgers at 3.30 are second in the NL behind the Phillies.