A. Check your app settings for any session timeout settings and adjust them if possible.
B. Make sure your device is not set to optimize battery for the app, as this can cause it to log out. Go to Settings > Battery > Battery Optimization and exclude the app.