If you don't have anything changed in the scene the graph will be lost if you reopen unity.
I think all you need to do is mark the scene as dirty after a graph change