Application is getting logout on first URL hit but working if we hit same URL again

We are using following version in our web applcation.

OS : Windows 8 / 11
Java Version : Java11
Tomcat Version : 8.5
Lucee Version :

As I said, its not working for first time but starts working if we reload the same URL. not sure what is the issue here. Please guide me.

what is happening in terms of cookie and set cookie headers with these requests

in order to be logged out, you need to have been previously logged in before? was the session expired?

Also, one strange thing we noticed is, if users are hitting URL for first time then they are getting logout page. If we login to lucee admin URL and then hit application URL then it starts working. What is one thing which is not getting set through application but getting set if admin URL got hit. Any idea?