Not in my experience, at all. Working beneath someone who’s difficult to work for can make your every day at work terrible. Working with someone who’s hard to work with is much more maintainable since you’re more in control of the interactions and can effect change by working with people higher in the org.
Oh, I mean that if someone’s a bad subordinate or peer they’ll probably also be a bad boss, or vice versa. I’d agree that a bad boss tends to be a worse thing to have than the other too.