If you save a reference to the node before deleting it, would it work?
func _ready ():
var node_for_delete = $ Sprite
remove_child ($ Sprite)
I'm not very clear about how everything happens when a node is removed from the scene, apart from the fact that there are several properties that are not very clear to me what they do, such as establishing an owner for a node. By the way, the printstraynodes () function tells you which nodes are orphaned, that is, no parent outside the scene tree. It only works in debugging mode.