When a flying change fails, the reason is usually that the horse became crooked and/or fell on the forehand. This results in a loss of the connection between the inside hind leg, the ground, the rider’s weight, and the reins which prevents the half halts from going through. That’s why things generally don’t improve if you keep cantering and keep repeating the aids for the flying changes.
It saves much time, sweat, and aggravation for both horse and rider, if you interrupt what you’re doing, bring the horse back to the trot or walk, or even to the halt, straighten and balance the horse, check his body for stiff, braced areas, remove the muscle blockages, and re-explain the biomechanics of the flying change (i.e. shift the weight, change the bend, move the pelvis).
As the horse is developing his conscious competence, he will often need time to think and to plan his next move so that he can perform the task deliberately. As he moves from conscious competence to unconscious competence, he can do flying changes anywhere, any time, with less and less preparation.