The air escapes into the atmosphere.
An emulsion is a colloidal dispersion of one liquid in another liquid in which it does not dissolve.
Ice cream is essentially an emulsion of the fat in milk with a sugar solution trapped in a network of small ice crystals. Other chemicals are added to prevent the emulsion from separating, and air bubbles are mixed into the semisolid mixture.
Up to 50 % of the volume of ice cream can be air.
When the ice cream melts, the air bubbles are no longer trapped. They just escape into the atmosphere.
If you re-freeze the melted ice cream, its volume will be much less than the original.