Dominate Monster — When this creature enters, gain control of target creature for as long as you control this creature.
If Mind Flayer leaves the battlefield or you lose control of it before its Dominate Monster ability resolves, control of the target creature doesn't change at all.