Months had passed since the Yankees lost two straight games at home to the same team. Heck, the whole summer came and went without that occurring.

The Yankees lost two in a row in the Bronx to Baltimore in late March, followed by losing two straight to the Tigers in the next series to open April. Those two teams went on to be the majors’ worst.

Which makes this a full-circle moment for the Yankees. Somehow, in October, they were playing like the Orioles and Tigers. “At this stage of the season, we would all say that was unacceptable,” Zack Britton said. “It was tough to watch.”

So tough that most of the sellout crowd had abandoned the Stadium over the final few innings. The few thousand who remained were reduced to mock cheers for such Little League fundamentals as the Yankees successfully catching pop-ups.

“We have to flush it,” Aaron Boone said.

Added Aaron Judge: “We have to wash it out.”

But there are some stains that are harder to eradicate. The Yankees have a three-game losing streak now — two in a row at home to the same team for the first time since the Orioles and Tigers. They have played progressively worse during the slide, culminating with a performance in an 8-3 loss that was deplorable in every phase.

Boone felt compelled to talk to his team after Game 4 to try to bolster his players for Game 5. He reminded the group of the adversity overcome all season, mainly through the blizzard of injuries. But the only thing “Savage” Thursday night was the beating the Astros inflicted. The next man up wasn’t a solution Thursday night. It was a problem. Just about everyone contributed to this unseemly performance.

“Our guys are studs and I think they embrace the challenge,” Boone said.

But let’s frame the challenge. The Yanks have to win a game Friday that Justin Verlander starts just to play two in Houston, where the Astros had the majors’ best home record and have Gerrit Cole ready to start short in Game 6 or on full rest in Game 7. But right now, the Yanks look a lot closer to Game 1 of the 2020 season than Game 6 of this ALCS. A team that showed fortitude all season partook in a late-game surrender in Game 4 in which they appeared outclassed and unnerved.

The Astros verbally slapped around the Yankees before Game 4 over claims that they were nefariously whistling to tip pitches in the ALCS opener and then physically exerted themselves over the nine innings to take a three-games-to-one lead.

“No one was tipping today and we scored eight runs,” said Astros shortstop Carlos Correa, who hit one of Houston’s two three-run homers.

If the Yanks never win a game at home in this ALCS, that will smear some — if not more than some — of the good vibes of a 103-win regular season in which they overcame 39 injured-list stints. At this point, overwhelming their personal postseason piñata Minnesota is not enough.

The Yanks are going to have to show they belong on the same field as the Astros. They are going to have to find a total game that is abandoning them. In winning their first four playoff games (three against the Twins), the Yanks went 14-for-45 (.311) with runners in scoring position. They are 1-for-16 in the three-game losing streak, including 0-for-13 in the Bronx. They struck out 13 times in Game 4.

Boone made the hot Gleyber Torres, 22, the youngest cleanup hitter in Yankees postseason history and he responded with his worst game: five hitless at-bats, two strikeouts and two errors. Torres and DJ LeMahieu — the dependables on this team all year — combined for four errors.

Masahiro Tanaka and Chad Green, as reliable as any Yankee pitchers this October, yielded the three-run homers. Gary Sanchez, who already had mostly forgotten how to hit, suddenly is having trouble catching the ball. Adam Ottavino, as undependable as just about any postseason pitcher ever, still can’t get anybody out.

In a metaphor for the evening, CC Sabathia — the last great Yankees ace — exited in the eighth with a left shoulder injury that will end his career. He left to a standing ovation — the only one of those over about the last 90 minutes of the game. This was a “Thanks for the memories,” especially 2009. The Yanks won it all that year. They are now perilously close to having their first World Series-less decade since the 1910s.

Boone insisted the Yankees “want to get on that plane to Houston.” But that means delousing from Game 4, rediscovering the best of their heart and their game for Game 5 and who knows if even that is enough against Verlander and the tough at-bats and athleticism of the Astros.

The Yankees are threatening not to go out like savages, but like Orioles.