Maybe get a trainer if you don’t have one. If you do, work on that with them!
Put your weight deep in the heels before the fence and focus on landing deep in the heels as well. This should train the leg to rest in the proper place before, over, and after a fence.
If you’re pressing your heel down far, it should naturally keep your leg forward. For your leg to come back, your heels are coming up. Press deeper into your heels over the jump.
Grip with your lower leg and not with your knees. You can do a lot of no stirrup work to help with that, and lots of 2-point position!