Prevent AR Session from stopping the first time

I have a question regarding the AR session,

I have implemented a Sign In and a Screenshot & Share to Social Media Features for my app, but whenever I use one of them for the first time, the app goes to the background and it stops de AR Session causing a black screen, if I restart my app it works normally even if I stop and reset AR Session, this only happens the first time you open the application.

Is there a way to prevent this to happen or to modify the android activity events to tell the system to not stop AR Session. Btw I have tested my app in iOS and it works without problems, the problem only exists in Android

Thanks for your help in advance,