He wasn’t stuck : his lawyers would contact the State Department and arrange a surrender. There is also the case of limited validity to return to the US. He chose to apply for asylum still and exiled himself.
I am not making the case one way or the other because https everywhere was beneficial. But he signed up for a security clearance and knew what his obligations were (eg allegiance to the US)