Interplay of mass transfer, phase separation, and membrane morphology in vapor-induced phase separation