No bug here.
The meaning of "handle resize event" is that the layout anchors and designer script are reapplied when the container is resized. This can happen any number of times.
Best solution is to do whatever you can in the layout file itself.
Otherwise, you either need to disable this feature or set the layout however you like in the Resize event:
Private Sub MainForm_Resize (Width As Double, Height As Double)
animatePanels
End Sub
Tip: You should never see Pane and Node in your code. Use B4XView.