User's are logged out when logging in from another Microsoft login prompt

I have a Ruby on Rails application and a React Native mobile application. I have configured OmniAuth on the Rails side using omniauth-azure-activedirectory-v2 and react-native-app-auth for the mobile app. Logging in works fine but the users are logged out if they try and sign in using their Microsoft account in a different app. For instance, I can login to the web application using Microsoft SSO. I then open the mobile app and login with Microsoft SSO. If I go back to the web application, it has been logged out. Even when selected "Stay signed in" this happens. Any configuration options I need to check?