Aaron Judge of the Yankees connects on his eighth-inning home run...

Aaron Judge of the Yankees connects on his eighth-inning home run against the Dodgers at Yankee Stadium on Sunday. Credit: Jim McIsaac

If the Dodgers’ visit to the Bronx was supposed to be a World Series preview, the Yankees would prefer a slightly different script come October.

But as Hollywood endings go, Sunday night provided a few plot twists and finally a sellout crowd-pleasing finish. Trent Grisham, a .083 hitter guest-starring in the No. 5 spot, delivered a go-ahead three-run blast in the sixth inning — amid chants of “We Want Soto!” — and Aaron Judge’s 24th homer capped the Yankees’ 6-4 victory that prevented a sweep by the Dodgers.

“That’s a playoff atmosphere,” said Judge, who went 7-for-11 with two doubles, three home runs and five RBIs against the Dodgers. “I know the results weren’t what we wanted for the series, but for the guys to come out and answer tonight against one of the best pitchers in the game [Tyler Glasnow], that speaks volumes.”

For one night at least, the Yankees proved they could win without Juan Soto, whose previous two-game absence had sabotaged what had been MLB’s most dangerous offense during the previous month. Manager Aaron Boone sat the slumping Anthony Rizzo, played Oswaldo Cabrera at third base (his homer gave the Yankees a 1-0 lead, their first of the series) and boldly inserted the little-used Grisham between Giancarlo Stanton and Gleyber Torres.

Grisham, who later said he was aware of the Soto chants, hammered Glasnow’s 2-and-1 fastball over the rightfield wall to put the Yankees ahead to stay, 5-3. Of his five hits this season, three are home runs.

No Soto was no problem Sunday. But the Yankees have plenty of other more lingering concerns, ones that were easier to mask when they were rolling to 45 wins and the top of the AL East. Letting Rizzo continue to be a near-zero in the middle of the order, shrugging off Torres’ subpar walk year, wondering if DJ LeMahieu will ever be an impact hitter again — the co-MVP performances of Soto and Judge had covered up a lot of these issues.

“Winning helps,” Boone said. “Playing winning baseball and being a part of that is why you’re doing this.”

Boone was speaking about a struggling player’s mindset. But if some of these liabilities don’t get corrected, the Yankees eventually could have bigger problems.

Consider the Dodgers a wake-up call. For the first 48 hours, the Yankees too often felt like a tourist in their own ballpark. They went 1-for-15 with runners in scoring position and scored four runs in 20 innings — three driven in by Judge — in dropping the first two games.

Adding insult to injury? The Bronx sounded like Chavez Ravine East during Saturday’s rout, as roughly 2,000 Dodgers fans drowned out the building’s usual tenants, especially when Teoscar Hernandez’s grand slam — his second homer of the game — sent nearly everyone else sprinting for the exits.

“They were loud,” Alex Verdugo said. “But at the end of the day, we had chances to take over the stadium again. If we get that big hit, we give our fans something to cheer about.”

For most of the weekend, Judge was the only Yankee worthy of applause, and he’s been unstoppable lately. In the past 32 games, he is hitting .418 with 18 homers, 40 RBIs and a 1.597 OPS.

So where was the rest of the pinstriped party? That’s a question Boone & Co. need to figure out now that some trouble spots have been percolating for a few weeks.

The most glaring is at first base, where Rizzo is fading fast. He is hitting .224 with a .623 OPS — an unacceptable output for that position — but he’s really nosedived lately. He had gone 1-for-29 in June, and Boone really had no choice but to replace him with LeMahieu for Sunday’s series finale.

“Just felt like it was time,” Boone said before Sunday’s game. “When asked if it has been a physical or mental issue with Rizzo, the manager replied, “Guess a little of both.”

The Yankees also should be pondering Torres’ future. The conventional wisdom projected a huge season for Torres heading into his first shot at free agency, but the sting of his lackluster plate performance (.230 batting average, .640 OPS) is exacerbated by his team-high 10 errors, tied for the second-most in the majors.

In the consecutive losses, Torres dropped a routine pop-up Friday night (trying a slick side-hip catch) and then had an easy grounder skip right through his legs Saturday, setting up Hernandez’s grand slam in the eighth inning.

The Yankees could afford to look the other way when Torres’ suspect glove wasn’t costing them, but against elite teams such as the Dodgers, there’s usually a price to pay. On Sunday, however, Torres made all the plays and the Yankees won their stadium back for a night. Until next time, maybe in October.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME ONLINE