Horse is having you on. Get after horse, make it stand still for this, and don't stop when horse quits acting up either, as that makes this worse, and don't praise it, as it is doing nothing praiseworthy.
I completely disagree with this. If you just continue to spray, spray, spray when the horse is terrified of the spray (even if the horse stops), you are just waiting for a wreck to happen because you are giving the horse zero release and overwhelming it.
You need to desensitize your horse to the fly spray, the same exact way you'd desensitize a horse to anything else they are scared of.
Usually it is easier to start desensitizing around the shoulder area. Start with your horse loose. He'll feel less "trapped" if he is not tied up. And if he moves around you, so what? It's a work in progress. Give him a good foot or two of slack in the lead rope, and make sure you stay to the side to keep yourself safe (never stand in front of him).
Fill an old bottle with water so you aren't wasting expensive fly spray.
Point the spray bottle at your horse's shoulder and start spritzing him with rhythm. He's going to try to move away from you. That's okay. Do not stop, but do not move closer. Move with him and hold your "pressure" steady. The very instant he stops moving his feet, STOP spraying and turn away from him. That
is his release of pressure for doing the correct thing. Give him 30 seconds to "soak" and then do it again. He'll probably move again. That's okay. Hold steady. The very instant he stops moving his feet, then you stop. Make sure to do this on both sides of the horse. Don't overdo it. Working on this 10 minutes every day is plenty.
Eventually, you'll get to a point that your horse will not move when you start spraying. So then your "reward" to stop spraying him is when he shows signs of relaxation. So you might start spraying him, and his head elevates and his eye get wide. Continue to spray until you see some sort of relaxation: head lowering, blinking, licking lips, etc.
Work on one body part at a time, keeping in mind you may have to start from scratch when moving to a different body part. Lower hind legs (for example) may be more scary for him that front legs. Always position yourself to the side of the horse to keep yourself out of harm's way.
Timing is very important. Don't stop spraying too soon, or your horse will learn incorrect behavior. Don't stop spraying too late, or your horse will not be rewarded for correct behavior.