NEW YORK – Before the predictable mass exodus on Tuesday night, there was time for one collective sarcastic cheer at Yankee Stadium.

That’s when the home team finally registered a defensive out in the seventh inning.

By then, the Detroit Tigers had sent 10 batters to the plate and scored eight runs against two Yankees relievers – turning a tie game into a one-sided romp.

As Gleyber Torres beamed from the visiting dugout and fellow ex-Yankee Anthony Rizzo downed a beer from the dugout seats, the Tigers sailed to a 12-2 victory.

“Got to show up (Wednesday), do our thing and be where we need to be,’’ said Aaron Judge, who belted career homer No. 359 to pass Yogi Berra for sole possession of fifth place on the Yankees’ all-time list.

After Judge’s 44th homer of the year, Cody Bellinger added a solo shot off Tigers’ starter Casey Mize, and by the fifth inning the Yanks appeared in the process of cutting Toronto’s AL East lead to one game.

They ended the night three games behind the Blue Jays, with 18 games left, following Toronto’s late winning rally against Houston.

On the Defining Dozen scoreboard, the Yankees are 4-3 in this 12-game stretch against current AL playoff teams, with two more games vs. Detroit and three at Boston.

And this one revealed more bullpen concerns and further exposed the Yankees’ shortstop situation, with Anthony Volpe lost at the plate – eliciting more venom from the Stadium crowd.

Yankees bullpen implodes in ugly seventh inning

During an ugly nine-batter stretch, Yankees relievers Fernando Cruz and Mark Leiter Jr. did not record an out, as a stunning seven Tigers batted with the infield in.

In a mostly encouraging start, Will Warren paid for a leadoff walk by Spencer Torkelson, leading to Parker Meadows’ game-tying two-run homer.

From there, Warren – with a 2.81 ERA in his last nine starts – watched the ‘pen torch a 2-2 game after six innings.

Detroit’s nine-run seventh began with Riley Greene’s double off a first-pitch splitter by Cruz.

“They were pretty disciplined with the split,’’ Yanks manager Aaron Boone said of Cruz’s signature pitch. “And obviously, that inning got away from us.’’

Cruz issued three more walks and Parker’s RBI single, ending a seven-game stretch that saw him yield one run over seven appearances (7.2 IP) with 11 Ks since coming off the injured list (oblique).

“Just one of those nights,’’ Cruz said of losing the feel for his signature splitter. “Sometimes, it’s not going to go your way.’’

Leiter Jr.’s place in a playoff bullpen is less defined, and a forgettable four-batter stretch – in relief of Cruz – didn’t help his cause.

Greeted by a soft, pop fly RBI single from ex-Yankee shortstop prospect Trey Sweeney that eluded Volpe’s pursuit in shallow center, things only got worse.

Leiter Jr. threw a wild pitch, hit a batter with the bases loaded and walked in a run before yielding Kerry Carpenter’s two-run triple, ending his night.

The continuing Anthony Volpe saga

Boone said he “considered’’ starting Jose Caballero over Volpe at shortstop Tuesday.

Caballero might be in there Wednesday, with Volpe in a 2-for-21 slide with 11 strikeouts – including Tuesday’s boo-filled 0-for-3 with two Ks and a blown sac bunt attempt.

It was a 2-2 game with runners at first and second, none out, when Volpe fouled out on a popped-up bunt, helping to short-circuit a potential fifth inning rally.

“Offensively, just finding that consistency has been the challenge for him,’’ Boone said of Volpe before the game. “(I) also believe and hope that his best days are…down the stretch and into October.’’

For Boone, Caballero’s versatility off the bench holds “strategic value’’ in keeping him mainly in that role.

“Look, I view Anthony as our shortstop,’’ said Boone, though he didn’t completely close the door on added starts for Caballero.

“I look at it as all hands on deck every day and try to do what’s best for the team every day.’’