they constantly tend to detach when the terrain changes.
The coordinate is preserved in the process. It's worth highlighting this object - not by clicking on it - which might cause it to detach, but by selecting it by area, and everything will return to its original position. If I'm not mistaken, you don't even need to do this - the saved coordinate is not reset in the game.