I used to have trouble with this too after breaking a hip in an ebike accident. Eventually I realized I couldn't stand on one leg, lift my right leg sideways to step it over the bike, and get on that way. Turned out super easy to just lean forward, stick my right leg out backwards parallel to the ground, then sort of rotate on to the bike, though. So the leg is passing over the rear rack, basically.