At one point for unrelated reasons I replaced light fixture in my room with more than 200W worth of strongest E27 Philips LED lightbulbs I could find (20*1521lumen).
Few flies gathered in the middle of the room as usual during the summer day. Then I turned on this light just out of curiosity. The flies dispersed within seconds, suddenly perfectly capable of not flying in circles. I don't think it was the heat or the discomfortably bright light just scaring them off. Even this amount wasn't as bright as sunny day. I think more light and more distributed light (not just comming from the direction of the window) fixed their navigational abilities somehow.