Companion Drones mod: https://mods.factorio.com/mod/Companion_Drones
If Player mark multiple factories for deconstruction, it lost those factories inside inventory: all of them point at the first/last one.
If player is trying place them again β it got the correct one, and multiple same factories with ghost items inside.
Checked in the editor: all lost factories are still there on other surfaces.
Note: Not tested for plain vanilla construction robots.
P.S. If It cannot be fixed β just restrict deconstruction them with robots and/or drones.