XWiki shows login page in annotation frame after login timout

We do integrate OIDC plugin on our XWiki and after login timout the request to open annotation on page shows logon page instead.

It is a little confusing.

Is there any way to redirect the “document page” or implement some other workaround to deal with it?