I had the same problem.
We fixed the issue by specifying the Expires or Max-Age of the cookie.
iOS has the problem of losing cookies without Expires or Max-Age that exist in web views in the background during memory cleanup.
I was able to find out from the cookie test on iOS safari.
I haven't tested it in all versions of iOS, but it happens in iOS 15 and later.