TL;DR
Placing a ghost over a deleted item of the same kind should simply "undelete" it.What ?
Placing a ghost over an identical item which is marked for deletion should simply remove the mark, not cause the item to be removed and then replaces.Why ?
Suppose you want to replace a build with a new and improved blueprint which is mostly the same but has a few small changes.Shift-clicking the blueprint will remove rocks, trees and cliffs, but not any existing items which will be preserved instead of replaced.
So you have to delete the existing build and paste over the new version.
Even though most of the build is unchanged, the bots will tear down everything, carry it all away into storage, then immediately bring it all back again and rebuild it. This can take a long time with a large blueprint (eg: I want to move my solar array one solar panel to the left...)
Note: If you place a ghost then mark it for deletion, it just disappears as if you had never placed it. The bots don't bring the object, put it down and then immediately pick it up again! So, conversely, if you mark something for deletion and then place a ghost over it, it should simply be unmarked and left.