I was in an extremely similar position recently. My best friend was hanging out with a girl she knew I extremely disliked. It was such a difficult period of time for me and I can completely relate to everything you've said. Through my experience I realised my best friend didn't truly appreciate me like I did her. For me I found that our friendship just wasn't working and I hated how she watched this other girl put me down and swear at me but was still best friends with her. IMO if your best friend continues being friends with someone that they know is unkind to you then I don't think your relationship is that strong. This obviously may not be the case for you, but my experience made me realise how out of place I was in my squad...
If detaching yourself from your friendship group just isn't an option, then just sit down with your bestie and tell her what's going on. Make a list of everything unkind this girl does to you and use it as evidence that she's not nice. I understand this may not work either but the only remaining option would be to talk to someone and I know how daunting it is, because I was worried they might think I was being petty.
I'm actually better friends with the girl now than my best friend because I confronted her face to face and we just complained about each other. This technique seemed to really work as neither of us liked each other and we worked out how to amend our behaviour so that we could be around each other.
In the end, I realised the fault lay with my bestie because she refused to do something for me even when I was going through something really difficult. She is so arragont and we aren't really friends anymore...
I hope this helped and that it didn't seem insensitive! I just talk from experience and I know how difficult it is to think about some of the things mentioned above.
For reference, I'm in a new friendship group now and I feel I can be myself more. I don't feel restrained and I love everyone.❤️ Good luck, whatever you decide to do!