After back-to-back walk-off wins in The Bronx, the Yankees couldn’t produce any late drama Monday against the Rangers.

In fact, they couldn’t even produce any runs in a 7-0 loss, the first time they were shut out since June 30 of last season by the Red Sox. The streak was MLB’s second longest since 1900, trailing only the 308-game stretch accomplished by the Yankees from 1931-33.

“It just [shows] how consistent they’ve been and how tough they are to get through,’’ Aaron Boone said of his lineup. “Eventually it was gonna fall.”

Texas left-hander Mike Minor was the main culprit, tossing 7 ¹/₃ scoreless innings and keeping the Yankees off balance with a deceptive fastball.

He outdueled Masahiro Tanaka, coming off seven shutout innings in a win in Seattle.

Tanaka had been solid in three of his previous four outings and that trend continued Monday, as he gave up just two runs over six innings.

Tanaka got into trouble quickly against the Rangers. He had runners on the corners with one out after singles by Elvis Andrus and Willie Calhoun. Nomar Mazara gave Texas a 1-0 lead with a sacrifice fly that scored Andrus.

The Yankees had a chance to tie the game in the bottom of the inning when Gary Sanchez followed Gleyber Torres’ two-out walk with a double to left, but Mike Ford hit a comebacker to strand both runners.

Minor retired 17 of 18 batters at one point, the second straight lefty starter to hold the Yankees down after Oakland’s Sean Manaea allowed just one hit in five shutout innings on Sunday.

Boone didn’t place much significance in the consecutive games in which the Yankees offense couldn’t score with a southpaw on the mound.

“Even with a great offense, you’re gonna hit a little lull,’’ said Boone, adding that he thought they made better contact against Manaea.

Boone was pleased with what he saw from Tanaka, who survived despite not having his best stuff. He’s given up two or fewer runs in all but one of his last five outings.

“He was able to work around some hard contact,’’ Boone said. “But [he] kind of gutted through it. Made some pitches when he had to.”

Tanaka pitched around a leadoff double by Shin-Soo Choo in the third. Clint Frazier crashed into the left-field wall on the play, but remained in the game.

Minor rolled through the first four innings having allowed just two hits and the Rangers extended their lead to 2-0 on Jose Trevino’s home run on Tanaka’s first pitch of the fifth.

Luke Voit opened the bottom of the inning with a double to left, but Mike Tauchman lined out to center, Frazier popped out and Tyler Wade flied to center.

Nestor Cortes Jr. took over for Tanaka and after a scoreless seventh, gave up an RBI single to Ronald Guzman in the eighth to make it 3-0. A three-run blast by Delino DeShields erased any real chance the Yankees had of another comeback.

Minor, who had been hit hard by the Angels in each of his last two times out, was on cruise control for much of the afternoon on a day Boone rested lefty-hitters Didi Gregorius and Brett Gardner.

Minor left with one out in the eighth and runners on first and second. Ex-Yankee Shawn Kelley got DJ LeMahieu and Aaron Judge to keep the Yankees off the board.

The Yankees are set to see a pair of right-handers in the next two games against Texas and they’ll likely hope to not see Minor again this season.

“He’s a good pitcher on top of his game and we weren’t able to mount much,’’ Boone said. “Any time we don’t score or have a good offensive showing, it’s a little bit surprising because these guys are so good. But it happens.’’