IK-constrained bones change position in the pose mode
When I have this problem I go to Pose Mode, select the bone concerned, shift it to where it's supposed to be, Press CTL-A and select -
'At Rest '.   

Check it in Edit and Object modes to see it doesn't move back again.
Do this for each bone that's out of place.

In your example I'd be rotating the bones above the yellow ones, which I think you might have tried already(?)