First off, make sure it’s not a health or pain related issue via vet visit.
Usually when horses take off sideways, it’s an evasion. She may be barn sour, or she may have decided to try it and it’s worked so she keeps doing it, since you mentioned she’s somewhat green.
If she were mine, and I’ve ruled out health and pain issues and my tack fits her correctly, I would take each moment and turn it into a training session.
Drive her forward. If she doesn’t have a forward installed, I would take her and start over with ground work. Horses will start behaviors that are negative when there are holes in their training. Since you don’t know where the hole is, I would guess its fundamental and go back to forward and in every direction I say. Then, move forward and review basics. If there’s another hole in the basics, it will show up again.
I would then take her into a large-ish enclosed field and start working her. If she wants to go sideways when I’m not asking for it, then she has to work harder. Let off all pressure and aids when she even thinks forward. Go from there. End the lesson when forward is established and not when she’s going sideways, or in any direction than what you want.
This is my opinion based on what was originally posted. If there are more details, then my opinion could change. :yes:
Good luck with her!