It's not showing it now, but when I Googled the same question, Google's AI (probably citing someone I can't find now) suggested that flying up high caused the nanites to freeze so The Engineer lost control over them. And that something about them freezing allowed him to pull them out of his mouth too (though that makes less sense to me since I feel like they'd be pretty insulated inside of him)