I think the node indices are stable and predictable. If that's the case, you should be able to get the number of children associated with a parent via get_child_count()
and then reference the last one via its index using get_child()
. So, essentially this:
var last_child = $Parent.get_child($Parent.get_child_count()-1)