Our plugin shouldn’t change and theme settings. It just switches the theme as per mobile devices.
If you are talking about widgets settings, then wordpress only allows widgets for active theme. So you lose those widgets settings. For that you need to register extra widgets for mobile theme in your main theme and you need to call it in mobile theme.