Is it just flies or is it anything else?
I had a GSD once decades ago who would flip out at flies. Got to the stage that she would attack the windows and half the time I truly couldn't see a damned fly there!
One day she smashed the window jumping at a fly (not sure if real or imagined, can't remember) and I was not happy, neither was she.
I had this VERY old and community-labelled 'essentric' vet who told me the strangest thing to do. But what did I have to lose, and no-one was around to laugh at me, so i did it.
I collected dead flies, as many as I could over a period of a few days and placed the dead flies everwyehere this bitch usually went schitzo. I know, I know, it sounds rediculous - but it worked.
I did this for a approx two weeks. I felt like a bloody grub but lo and behold, it 'broke' her cycle. She never bothered with flies again.
Please don't piss yourself laughing at this. It might sound stupid, but hey, it worked!