I think what you are worried about is your lack of authenticity. If your actions don't support your values at all times, you're worried you are not staying true to yourself. I don't think this is the case. I think the fact that you were able to pick up upon the fact that you behaved this way in the first place means that you are not confused about where you stand as a person and THAT is what keeps your authenticity. Your mind should get more credit than you are giving it right now, I think deep down you know why in a given situation you are agreeing with them (maybe you feel like it'll be more troublesome to state how you truly feel than just nodding along, maybe you just need to say some stuff to get your promotion, maybe your tired and want to gracefully get out of a conversation) I guess what I'm trying to say, as long as it's not doing any harm, jeopardizing anything in your/their life (relationships, etc) I think you'll be alright. It may just be your way of navigating around people.
Baby steps i suppose. You can offer your true opinion in disguise. For example: person 1 says " Do I look fat in this dress?"
person 2 says " No of course not" but actually thinking they do. Then says " The dress is tight in some places though."
Learn to value yourself. You are what you are. You think what you think. There is no room for judgement. You are unique and there is no one like you and that is your power in this universe. SO go right ahead, let your opinion be heard. It may happen that it isn't what they wanna hear, but at the very same time it might happen that what you have to say might bring a completely new idea or perspective to the table and they would like you even more.
About others liking you, it is alright, not everyone has to like you. You are special in your own ways. Not everyone is going to agree with you and your ways , while some will completely support you. And that is alright. That's how we humans are, diverse in every way,
So don't worry about anything, I am right here and I am saying that I wanna hear what you actually wanna say. :)