Back her to the fence then put something on the other side of her to where she can see it then have a firm grip on the reins and get on. If that doesn't work then every time she tries to move smack her on the butt.
My horse does the same thing!!
What I do is I put him right up against the fence and the put a block or jump behind him and then put the mounting block behind him, so he can't move to either side or backwards. That works if your horse isn't ok with the mounting block. If they don't like you getting on period. Then just follow he/she around until she/ hestands still and then put your foot in the stirrup and follow he/she around until he/she stands still and then get on. Sorry that was long but that works for me!!
My mare does this when I am doing up her girth and mounting and what I do is put her in front of a jump to entertain her but she tries to eat the decorations sometimes but another way is when I am tightening her girth or mounting I say whoa in a stern but soft way and it works pretty well. Another way I mount her sometimes is mounting her very slowly like putting my foot in the stirrup and putting weights in it and then releasing and it usually works pretty well.
My horse does the exact same thing and he's so irritated when we mount we thought the saddle didn't fit him well so we got him a rider pad and he was fine but he's getting more filled and his saddles super uncomfortable for him so long story short we think we need to switch out his saddle. Lol sorry that was long
The trick is making the wrong thing hard and the right thing easy. When she moves and you didn't ask her to, make her move even more and make it hard work for her to move.
If you're trying to mount and your horse starts to move away, yielding the hindquarters before mounting helps a bunch since it's hard work for the horse. There's a few videos on youtube explaining what this is if you're unsure how to make your horse yield their hindquarters.
After moving her feet for about a minute, ask her to stand again. If she stands, praise and hop on. If she fails to stand when asked, continue to make her work. She'll get the idea eventually that if she moves, it means more work. She'll figure out that standing still is much easier than working and losing some weight!
Good luck! :) This worked for me and others I've helped with dancing horses when mounting. Although it can take a while depending on your horse, the outcome is great! Patience is key, however.