I had a similar problem and now am confused what the Front panel: close method does. I always thought that Closing the front panel doesn't mean stopping all the codes. It is just close the "front panel" and the program still runs until Exit case. So it does make senses to have the clean Data after the front panel close.
However, it seems to me now when the front panel is closed, the loop is forced to stop and everything waiting in the queue after the front panel close case is destroyed. Is it true?