The only solution i can muster up is to use tool
Unfortunately the following is an estimation and has not been tested
So it may not work as intended
tool
extends Node
class_name My_Custom_Node
func _enter_tree():
if Engine.editor_hint:
var packed_scene = load("custom_node")
var custom_node = packed_scene.instance()
self.replace_by(custom_node)
custom_node.set_owner(get_scene())
Or you can try the plug-in way which should get you the results you expect