Do you have a deform rig? That’s where you’d fix this problem. A deform rig is just a series of bones whose only purpose is to deform the mesh, and they copy to loc/rot/scale of other various bones in the rig.
From what I see of your example, you have an IK leg rig there and your foot ik controller looks to also be deforming the foot. That’s why it can be pulled away from the leg, because IK controllers can’t be a child of the bones they are controlling. Now if you had a set of deform bones, you’d have an upper leg, lower leg, foot, and toe bones. The toe bone would be a connected child of the foot bone, foot bone a connected child of lower leg bone, lower leg bone would… etc, etc… The upper leg bone would copy the loc/rot of the IK upper leg bone, all the rest of the deform bones would just copy the rot of their IK bones. Since all the deform bones are connected children, they can only copy the rot of the IK bones and can’t be torn apart like yours.
If you were creating an FK leg rig, it would be constructed just as the deform leg rig would be, and you could use that instead of the deform rig. That’s how I use to rig and I used to think the deform bones were a waste of time creating. Lost of bones to copy, rename, ad constraints & drivers, tons of work. Now that my rigs are fairly advanced, I see the sense in them, keeps complex rigs just a tad bit more sane to deal with.
So copy your upper leg, lower leg, foot & toe bones, move them to a different bone layer. Make them connected children, and make the new upper leg the child of whatever the IK upper leg’s parent is, and add copy rot constraints to the new bone’s targeting the IK bones. Rename the new bones and update the mesh’s vertex groups. Solves your problem.
Along the way to learning this stuff, you’ll learn how to control multiple constraints with one control. When you learn that, you’ll already have an FK leg in your character, you simply have to turn all the constraints off.
Good luck learning…
Randy