Lock position of a Button
Click Edit Mode on your Code Window.
Open the inspector window of the button you want to lock in place. You can do this by either double clicking on the code button or highlighting the button and click Inspector.
Navigate to the Appearance tab of the inspector window.
Tick Lock position to lock the current position of the button.
You can also lock the position of the button by pressing Control + Clicking on the code button, then click Lock Button.