So do you get a reference to the scene object after you put your prefab in the scene? Whats the flow here?
If you spawn a prefab in at runtime then you have to also get any references to scene objects at runtime. If you tell a prefab (in the scene) to target a scene object in editor mode then it is no longer a prefab, it is an Instance of a prefab. If you Applied those changes to the Prefab in the project hierarchy then the connection between the live scene object and the Prefab would break. Unity sometimes allows the connections to exist in appearance, but it always breaks them when they are actually processed.