Some Sqlite values and SharedPreferences are outdated

I’m getting a strange bug where shared preferences and sqlite values are outdated after installing a new version of my app. I save a JWT in shared preferences and sqlite but I notice that whenever a new version of the app is reinstalled, the value of the JWT is a value that’s a few days old. Even if I have just saved a new value right before installing the new version of the app, the outdated value from some days ago is returned in the new version of the app. I haven’t been able to replicate this problem in a sample app, and so far the problem only happens with a Samsung Galaxy Note 20 Ultra. On a Google Pixel and Tecno Pop 2 Plus we don’t see the problem. I’d greatly appreciate any ideas that can help, thanks.