I notice you still have some programs running in that screenshot. I wonder if one if them is actually displaying that rectangle there. Even if not a program in the dock, it could be some other program doing it. Have you seen it after ensuring that all programs are terminated?
I have a program that does something slightly similar. If I hover over something, I get a popup. With the popup still displaying I command tab away. The popup continues to display even though the program responsible for it is not. That's way less extreme than what you're seeing, but still it's an residual rendering which should have disappeared.