Problem with copy pose from mesh and foot ik

I’m trying to create a character creation system using a similar approach as Fortnite using Copy Pose From Mesh in the children’s animBP but because I have foot ik for the parent I get this problem when on slopes as shown in these pics:
image image
and this is the bone hierarchy for the head(the parent (the body) has the default UE Hierarchy):

How can I Fix it?

Thank you in advance!