You would be able to if you backed up your save data with Nintendo switch online. To do so, you would go to Pokemon home on the main menu, press + to get to options, go to save data cloud, go to your account, and back up data. If not you would lose them since save data is stored on the switch itself not the cartidge or game.
Source
Hope I helped!