Throughout my time in the army, I've had my fair share of bad bosses for different reasons. Some were bad because they made decisions that I couldn't control, while others were good people but just not good leaders. But here's what I've learned: every bad boss you have is temporary and will sort themselves out eventually.
Instead of letting a bad boss sour you, stay true to yourself, do your job well and stay positive. The more positive and productive you are, the more influence you'll have on them and the more leeway you'll have in your job. It's important to remember to not let a bad boss make you negative, but instead focus on moving forward towards a common goal.
Overall, a bad boss will sort themselves out, and if you're performing to the best of your abilities, they will have less control over you.