I don't understand the issue..
You are spawning the red squares, but not destroying them, so they will remain..
Maybe I just don't understand what you are trying to do..
The red squares don't seem to have any function, so I'm not sure why you are spawning them..