In my case I had a loop of 5x5x5x5 times in my NS-2 script invoking Gnuplot 6 times with every run. The flashing window literally leaves the screen unusable as the Gnuplot X11 terminal window keeps popping up and out in a blink.
A temporary fix (which doesn't require rewriting my whole Gnuplot script set) is to use:
set terminal unknownDoing this stops the flash with the first 'plot' command. The subsequent 'replot' commands can define their own terminals as needed.