Anticipating Baby Brother is a HUGE change. Could be some regression there because of the increasing focus on a new baby coming – it's common. But even if your pregnancy wasn't complicating the picture, your daughter is just on the leading edge of when training really works for little girls (and some don't put it all together until much later).
Before then, it tends to be the parents who are trained to get the child to the potty at regular intervals. That really isn't the same thing as the child having enough maturity and the emotional commitment to make this developmental step forward. And like walking and talking, it is a developmental step that kids choose to make when they are ready.
Nine months is an awfully long time for training, which suggests to me that even though your daughter gets the concept, and can apparently hold her pee, she feels pushed to do more than she is prepared for. But just like walking or talking, parents can't "make" their children ready for potty success.
Interestingly enough, willful children are usually more cheerfully cooperative if parents understand that they are trying to meet some emotional or physical need through their behavior, and find ways acceptable to both to meet that need. Kids choose confounding, frustrating and negative behaviors, because, well, they are little kids, with very little impulse control, no power, and very little experience.
Your daughter could be desperate for more autonomy with the potty training, for example. I've seen this work several times: Mom tells child that (s)he will have the choice whether or not to use the potty. Does Child want a diaper this afternoon, or to try to remember to go potty? If Child doesn't choose, it's the diaper till next change. (Child may even run to Mom for help getting diaper down in time to use the potty!).
She could also be experiencing some vague unease about being displaced by a new baby, who will get all the pampering (including diaper changes) and snuggle time before bed. Mom might find ways to reassure Child that she'll always have time for her. Even though that won't always be true, you can give her the perception that you sincerely want it to be true.
One of many useful techniques used in the brilliant little book How to Talk So Kids Will Listen, and Listen So Kids Will Talk, by Faber and Mazlish (authors of the Siblings Without Rivalry that Liz A mentions below) is to empathize wholeheartedly with the child's wishes. "Yes, I would love it if I could sit here with you ALL NIGHT! I want to be near you as much as I can! Let's hold hands for 5 whole minutes, and count every breath that we take together!"
I used to do this with my daughter, and she'd be asleep in a couple of minutes. But even if she doesn't fall asleep, your daughter will be soothed and gratified to know how much you WANT to be with her. When the five minutes is up, you can say, "Okay, love, I need to go do ______ now, and you need your sweet, happy sleep. I'll come back and check on you and give you an extra kiss in 10 minutes. You snuggle with (toy) and think how much happy time we just had."
Good luck. With a little delicate maneuvering, you can often convince a child that what you want is what she wants. And the books by Faber and Mazlish are goldmines!