It's understandable that fans are going to be down on the defense given how many yards they've given up. As a fan, a defensive 3 and out is thrilling while giving up a 90+ yard drive is soul crushing, especially when it comes in 18 plays a few yards at a time and seems inevitable.
The thing to remember when we have a good run defense but poor pass defense is that it gets easier to play defense as the opponent gets closer to our end zone because the field compresses. Our secondary has less field that they need to defend and speed becomes less of a factor. The CBs can press because they can't get beat deep and the LBs can play closer to the line of scrimmage.
This is also sometimes true when an opponent needs a critical yard here or there in the middle of the field because most are averse to taking big risky shots when they only need a yard or two. The defense has come up big a number of times in these situations, holding opponents to punts and field goals instead of TDs.
Another thing to consider is that when you force an opponent to spend 18 plays moving the ball down the field that majorly increases the chance of a play going your way sometime in that series. Bad throws, drops, tipped passes, hurried passes, fumbles, and not seeing a defender all happen from time to time. A long drive that ends in a turnover is still worth 0 points to the opponent, and a short drive that ends in a turnover has created a number of our points on offense this year.
Finally, as others have said, scoring is up a lot this year. It's tough to get that upset about the Dolphins putting up 23 against us when you see them put up 28 on the Bills, 31 on the Jags, and then 43 on the 49ers. Similarly, the Vikings put up more points against two other undefeated teams (Packers and Titans) than they did against us.