This is what the rulebook says. (Section 6-18-c-12)
A goal shall not be allowed if
" the goal cage has been moved or dislodged. The goal frame is considered to be displaced if any portion of the goal frame is not in
its proper position (e.g., frame must be completely flat on the ice surface, goal posts must be in proper place and affixed securely in
place with its pegs)."