I would say it depends on the context of the drive. If a team starts at their own 20 and takes a bunch of plays and time to get to the opposing 40 yard line, and the defense forces a 3rd and long and a penalty results in a first down for the offense, that would definitely lessen their energy, the explosiveness off the ball and the effort level on the next play immediately after the penalty.
But if this context occurs in the 1st or 2nd quarter, I would say the defense has no excuse for being that drained.
On the flip side of that, if the drive is only 3-4 minutes in, the defense shouldn't lose a step after a drive extending penalty. They should be relatively fresh. It's a shot to the morale and enthusiasm, but I don't see why you should allow a 43 yard touchdown.
I definitely see your point and I'm not disagreeing with that major penalties are a killer. Having played football for 7 years, and even currently in ice hockey, I know those things can really get to you. But at the same, you're a paid professional and need to move on to the next play.
Speaking in regards to today's game specifically, I honestly believe the difference was quieting the crowd every time they got loud to give the defense energy by going to Gronk for a 1st down. Even if the PI call on the incomplete pass to Gronk was not called, with the way both teams were playing and the momentum of the game in the Pats favor, the odds are in favor of the punter pinning Buffalo inside their 20 and them eventually punting the ball back.