Which medication?

My gf has borderline and she is going to a psychiatrist. He prescribed her Xanax which is really not okay. Benzos will make u calm and feel no pain but it’s not a solution. Do u guys have different experiences with medication for borderline ? Because I really don’t understand why u would prescribe someone Xanax when u feel empty , anxious and feel like dying every breath u take ..