do breaststroke with free kicks, for more stable hip, try to transition to breast kick with same stable hip. on the other side do breast with butterfly kicks for improving the undulation in breaststroke, keep the legs fairly strait, not to much knee bend. this is 100% a motorpatternproblem
Distance makes a difference. Look at Soni and Efimova. Depth and undulation is vital. Notice Peaty presses DOWN with the legs initially and that brings the hips up