Sounds like "image persistence". LCD images will retain ghosts of images if they are left on with the same image for a long time.
The standard recommendation, is that if you wish to get rid of it, leave the computer off (screen off) for an amount of time at least equal to the amount of time that the image was on the screen. So, if say it took 20 hours to get the image stuck, then leave the computer off for at least 20 hours (usually requires much more).
I dealt with researching all this when my iMac had images burned-in to the screen.
Most were thinking that it was image persistence. But, in my case, the damage was permanent. The iMac's screen literally looked like I had traced the outline of several windows (including the little minimize / close globes) using an exacto knife. It was a white trace line that showed incredible detail. You could see exactly what I was working on.
I called out a tech to look at the computer, and he was quite surprised. They ordered a new screen for me and installed it here at the house (under AppleCare).
He did verify that it wasn't something in the video system and such first. And, it was most definitely in the screen. You could see it anytime the screen was lit. Even right after startup. But, it didn't appear on cloned external monitors.
The new LCD panel took care of the problem. But, then of course I was paranoid about it happening again.
In my case, it was that I was using the computer for audio work, and it just got the computer warmed up enough to cook the image into the screen. I could repeat it and cause new images to be burned into the panel anytime I did audio work in that particular program (it worked the computer hard - been a while now so I don't recall the program name).
Since I didn't want to have the issue happen again, I have since avoided all-in-one systems. And, only do my audio work and stressful tasks on computers with external displays. My audio tasks got moved to a PC since I found better tools to do what I was doing for the PC.
But, these days, you couldn't sell me on an iMac for anything. I want my external panels.
I've had a number of issues with iMacs since they went to the current case design (LCD with computer behind it). And, it's such a pain when the computer is the screen and something goes wrong with the screen. Then I'm out the whole system while I wait for the shop to get the parts and perform the repair (since they usually have the computer).
Anyway, sounds to me that if the image went away, that you were experiencing the more common "Image Persistence". You can Google it, and read up on it.