Loging out after migrating dev app data base to prod

In our company we have two instances of MB - dev and prod with its own DB each. After making some updates and testing them we copy the whole dev database to prod (we drop prod DB and then create it again with template that is dev). However, before dropping, we put the whole data from tables core_session and login_history of prod to dev to have them the same after restoring prod DB. But all our users get logged out after such manipulation. If there is any way to avoid logging out?

You need to keep the core_session table alive