Only way I can think of is not using sprite in saved scene directly, but by instancing sprite from code. As long as you don't define owner
, the node and it's resources won't be saved on disk.
If you need to have the sprite in editor to adjust settings etc. you can duplicate the sprite. Something along these lines:
if Engine.editor_hint:
# Duplicate without scripts, groups or signals
var duplicate_sprite = target_sprite.duplicate(DUPLICATE_USE_INSTANCING)
add_child(duplicate_sprite)
# Set duplicate_sprite.texture
else:
# Set target_sprite.texture