All teams go through stretches where they don't play well. But you're right, the long losing streaks are avoidable. The key to making a, say, 12-game stretch of not playing well 5-7 as opposed to 2-10 is defending well (we haven't been), pitching (hasn't always been poor but certainly isn't at the level we're used to) and if you aren't a consistent offensive juggernaut you have to find ways to squeeze across a run here & there (we're not really built that way).
Pitch & defend better, and the home run or two, likely with no one on base, can be a difference maker.