Lock the object when it is touched

When, I touch the screen, there are some objects for design, not needed for interaction.
Even if this object is pressed, is there a function to lock it so that it is not pressed?