experiment by riding with one leg out of the stirrup. Try the leg with heel that won't stay down being the one hanging out of the stirrup and then the other.
Usually when heel comes up it's because you are gripping with the knee or upper calf. Your weight stops at that point, instead of flowing all the way down through your heel.
Try the above exersize and see what you feel.
Also, when you trot and are posting,as you will for test A, think, really visualize, your heel tying to reach down and meet your horse's back feet, where they are hitting the ground directly under the horse. So you both are "hitting the ground" directly under his belly.
Be sure to freshen your horse out on the trails from time to time.
When you are trail riding, work on correct halts and free walks. You get a lot of points for that!