Tips for flying alone w a small dog?

Am

I’ve flown w her before but with my mom.

She’s a very anxious dog so I always have to give her one of those sleeping pills (the vet is the one who gives it to me don’t worry, not a random pill). But even tho she’s sleepy, whenever I would leave her w my mom to go to the bathroom she would start whining.

Am I supposed to leave her alone if I have to go to the bathroom? Can I just take her in her crate? I worry that so many things will go wrong and I’m going to be alone with her.