So basically what happens is when you parent a UI element to another, and make the parent invisible, and then change the UI elements parent back: it will still assume the visibility state of the old parent.
GUI A is parented to GUI B;
GUI A and B are Visible;
GUI B.Visible is set to false
GUI A is Parented to GUI Bs Parent
Both GUI A and GUI B are not Rendered, However GUI A.Visible is true.
Video:
I produced the inverse behavior as well, but could not reproduce it.