My trainer always tells me to "put my feet on the dashboard" now obviously I don't put my feet up high or anything but sticking your leg out in front to the girth will help keep heels down, leg forward and feet in the stirrups. I know when I et my leg fall back my right foot tends to slip out so I have to really concentrate on that
I had a LOT of trouble with this, and I tried everything - with a lot of core strength I was able to get it okay sometimes, then I got a new saddle and raised my stirrups two holes and voila, easy peasy.
So it may be your tack, but might be something else.
I also found concentrating on having my toes up rather than heels down helped. And to concentrate on having a firm calf hold and never letting go of it.
I always think of gripping with my lower leg and not knees, this gives you a wonder surface area to cover on the horse and should stop your leg sliding back. I always think of the knees as a pivoting point, when they tighten, your lower leg swings back. Also keeping your heels down will help