Dont click on the lock at the top. Find the layer you dont want to move and click next to the eye under the top lock for that layer. If you are using gimp version 3 a little menu will pop up with four options. The second one from the left will keep it in place "Lock position and size"
