Unless you're perfect, "don't change and just be yourself" is probably just the biggest bull-crap advice everyone's giving to you. It doesn't worth your every effort trying to live up to this "advice" if you'd end up being unhappy with the effects of being yourself, like having everybody else loathing you,or even worse, having you hating yourself. There's nothing wrong with changing for the better when you have to - no one really stays the same forever anyway. Just like in the wild, only those who can adapt well survives. It's always the survival of the fittest.
So just be whatever that makes you a happy camper and don't let people's idea of "you've changed" intimidate you. Just add "..for the better" to the end of that and move on with your now happier life. You being happy and comfortable with who you are is all that matters in the end, isn't it?