Lots of female dogs lift their legs, just like lots of male dogs squat. Dogs use urine as a calling card - it carries a ton of information about the dog's age, sex, health, etc, and they love to strategically place their urine to mark their territories or to cover up other scents. Sometimes this requires aiming up a bit.
If you really want to change her behavior, you can focus on rewarding her when she squats and trying to interrupt her when she's going to lift her leg (often dogs will sniff the spot they're going to go ahead of time, so based on where she's sniffing you may be able to tell which she intends to do). If my dog is trying to stop in an inopportune place, I'll pick up my walking pace and tell her "let's go!" or "come on!" to tell her that now is time for moving, not marking. Then I give her the freedom to sniff around and pee when we're somewhere more appropriate and give her praise/treats for going in the right place. Eventually, if you're consistent, she'll learn to squat more and lift her leg less.