Locked logic is not moved during Layout. Locked logic only becomes permanent if you commit the changes to your design before exiting.
To lock instances:
Select the instance to lock. To select multiple instances, hold down the CTRL key and select multiple instances with your mouse.
From the Logic menu, choose Lock to lock the selected instances. To lock all instances, choose Lock All.
From the File menu, choose Commit to save your changes in this session. To save your changes in the design file (.adb), you must save your design in Designer as well.
To unlock an instance:
Select the instance. To select multiple macros, hold down the CTRL key and select multiple macros.
From the Logic menu, choose Unlock to unlock the selected instances. To unlock all instances, choose Unlock All.