As an example, let us consider a binary system of a neutron star and an evolved star (e.g. red giant) that has expanded, filled its roche lobe, and started the mass transfer onto the neutron star. Under certain conditions such mass transfer can become a runaway process, the accretion onto the neutron star is engulfed, and the matter that leaves the outer layers of the donor quickly surround the binary system and the two objects find themselves orbiting around each other in a dense gaseous environment. Such phase is generally referred to as Common Envelope phase. In many papers I have read the sentence:
The common envelope phase ends either with the ejection of the common envelope or by the merger of the two systems still inside the envelope.
I understand the latter possibility, that is that the dynamical interaction of the two objects in a dense environment would lead the system to the lost of orbital energy, the shrinking of their orbital separation, and due to further loss through gravitational wave emission, to merging.
What puzzles me is: why, and how is it possible that the common envelope is instead being ejected?