MacBook Pro: Glitch/Copy of closed Window - Graphic card or monitor defect
The MacBook screen is experiencing what's called a burn in effect image persistence. This problem is an electric charge build up on the LCD. (Correction by @Allan)

It's a hardware issue and is generally resolved by screen replacement. There is no software fix for this issue.

(P.S.: Apparently, this issue was widely faced by a lot of Mid 2012 Retina MacBook Pro users. Related discussions here and here)