Happened to a friend of mine.
She was scooped up by another family (pretty literally, rather than wandering the streets) but SS had to approve the set up for it to become long term. But whether that can happen is so dependent on circumstances.
I don't want to post much more as it's not really my story, but will say that her school's strong opinion about the desirability of her remaining with that family appeared to be influential.