My quarter horse used to do the same thing, to get him to stop I warm up and circle in every corner. Before I ride I use side reins when I round pen him, they help with musclein the neck that might be weak. Another simple thing it to do neck stretches.
My horse does this sometimes too. What i do is keep my hands nice and still and together and i sqeeze my inside leg and half halt with the inside rein. When she bends in (it can take time just stay nice and calm and keep your hands nice and still) but as soon and she bends in and gives the slightest flexion reward her by giving with your inside rein and just keep rewarding her by being soft with your inside rein when she flexes in:) sorry its a bit hard to understand but try this it might help!