1. Dispel Magic on a Conjured Elemental that has broken free of control causes the elemental to vanish, because it causes the spell to end, and when the spell ends, the elemental vanishes.
2. Dispel Magic on a Conjured Elemental that has broken free of control causes the elemental to become permanent, because it causes the spell to end, and the only remaining part of the spell is the part that causes the elemental to vanish; if that gets dispelled, then that's the only part that doesn't take effect, therefore the Elemental sticks around.