Macbook Air Mid 2013 screen flickering after using in clamshell mode
Putting MBA in to Sleep mode will make it write a Sleep image, that is a file that contains your last settings ect.

Now when it wakes up it tries to load that file just to find out all is different now, no monitor ? 

Then it goes in to switching the display modes that creates the flickering.

My advice, skip the Sleep mode and just open the clamshell, then turn off the monitor and unplug it.