The problem with codependent people is they sometimes don't know how to maintain a relationship that isn't based off their false beliefs. If she only feels like she is good at being a caretaker, or only is desirable to others when she is performing for them, she may not have the interpersonal or social skills to keep up a healthy relationship when that pattern breaks. Most people with codependency issues do not understand what they are doing, and are not rationally making the choice "I can no longer relate to this person because I feel anxious not being able to take care of their needs, so I'm going to end the relationship now that they don't need me any longer." So instead the find a subconscious way to end or sabotage the relationship to end their anxiety
, end the relationship, and allow them the freedom to jump into a new relationship with a new person.
She probably really thought they were your friend, and probably thought the relationship was important because she spent time trying to play the role of caretaker. But once you didn't need that role, and she felt your resistance to their taking control, she used that resistance to extinguish the friendship (causing the strange incident over what you could and couldn't drink).
I don't know if I'd say you made a mistake. I think you made a relationship, discovered it wasn't a healthy relationship, and refused to allow her to control you with her unhealthy patterns. That's a wise choice, and shouldn't be held against you as an error or mistake. People always show us their best qualities when starting a relationship or friendship. The key is knowing when it's time to say "this isn't healthy" and then getting out of the relationship before it causes damage. And it sounds like you did just that.
She has issues that she's probably had since a small child. It may take her a long time to realize she's trapped making the same mistakes over and over again, assuming she ever dose see that. Some people with codependency can live their whole lives without ever really owning their issues or owning their part in why relationships failed or never seemed fulfilling enough. But there's no way for you to rush the healing process for her, it's something she's got to walk through.