Any decision that you make regarding your career should look to optimize one thing: Your rate of learning.
The context of how you do this best is by choosing to work with the best people, people who are trustworthy, people who you know have integrity and who you know will challenge you to become a better version of yourself.
Experience is valuable as it can help you navigate toward better decision making, choosing better people to work for in environments that you know you will learn the most maximally in the shortest amount of time.
There is no value in learning something over a long period of time — those things, the real things that can be learned over extended period and stretch will naturally occur without you intentionally working on them.
So, optimize for the shorter term things, become better in certain areas, and work with people who want you to get their faster than you could do yourself.
You don’t have to hate the people that you work with but you certainly should respect them. If you don’t, you’re probably in the wrong spot. It’s not that you have to like them and you certainly don’t have to love them — but there’s a very clear different between liking someone and respecting them.
I have worked for many people that I would not necessarily be friends with but who I had the utmost respect for, because they were leaders that I could trust and follow. In a perfect world I’d like them as well as respect them but as far as I can tell we simply don’t live in a world that is perfect.
Optimize for great people and Rate of Learning and you’ll do just fine.