Try use this scheme.
In code when you call stopArSession
But, i think, if you add delay, it’s working, more correctly.
(I remembered that I found some strange bug with the first few turns on the application, so I did not turn off the Ar session the first 3 times the application was turned on on the device, then everything works correctly)
And about problem when collapsed application, you can try to do something thing with
…\Engine\Plugins\Runtime\AR\Google\GoogleARCore\Source\GoogleARCoreBase\Private\GoogleARCoreXRTrackingSystem.cpp
and
…\Engine\Plugins\Runtime\AR\Google\GoogleARCore\Source\GoogleARCoreBase\Java
And the files lying in these directories. I didn’t have time to figure out this problem, but I think the problem is the same as described here
https://stackoverflow.com/questions/46401101/arcore-session-is-not-restarting