You become an MSP by being resident in Scotland and either not needing leave to remain in the UK, or holding any such leave to remain (s16 Scotland Act 1998 as amended), and being elected.
If they choose to leave, that would imply resignation from being MSP. If they are forced to leave, there would be no such implication.