In your case it seems like they aren’t moving their inside shoulder with them. A lot of horses do this to get out of things, I’ve ridden plenty of horses that do this and oh my is it annoying!! I would practice just moving the shoulder with the rest of the body, so practicing leg yields is a great way. Instead of turning onto the long side of the ring like you normally would, turn 5-10 feet earlier (depends on how big your ring is) so you are away from the fence and leg yield them over to the rail so right before you turn again you are on the rail. This always works for my horses!
Once you’ve practiced that then they might respond better. If not, use inside leg to push them over and, although it seems wrong, inside rein to keep their shoulder aligned with the rest of their body. It’s tough to explain (I’m also just terrible at explaining things 😂) but once you get it you will completely understand what I’m talking about! Think of the front of your horse like a triangle. Your hands are two points and the horses nose is the third. You want to keep everything “inside” of the triangle, meaning their shoulders shouldn’t be unbalanced compared to the triangle (meaning one shoulder shouldn’t be further out than the other).
Let me know if you understood that at all... I can try to explain it differently lol!! Hope this helps answer your question, good luck!