It's hard to say what you're working on there.
If you're having some issues with timing, you can use call_deferred to delay things a frame.
That can get kind of messy, alternatively you can try and create a central piece of logic that executes at the root node. When that one is ready you can be assured all child nodes are ready as well. Since ready works backwards up the tree.
Another thing you have to be mindful of with export variables in tool mode, is that when the scene initializes, the editor will take the saved value for that variable (from the scene file), and set it with the setter function. This will also execute any code you have there. So if you have code that depends on the state being ready, you will run into an error, because this code will execute at initialization.
You can wrap a setter like I have below, if you need to prevent conditional code from running in tool mode:
# For things that need to be in the tree
func set_export_var(val):
my_export_var = val
if(is_inside_tree()):
# Do stuff
# For things that need to be ready
onready var is_ready = true
func set_export_var = val
my_export_var = val
if(is_ready):
# Do stuff