Volto 17 not redirect back to the previously accessed unauthorized page after login

When accessing an unauthorized page, there will be a prompt indicating that login is required.

# Unauthorized

### You are not authorized to access this resource.

You are trying to access a protected resource, please [log in] first.

Following the prompt to enter the [Log in] URL, after entering the username and password and clicking login, the page does not respond or redirect.

However, the login has actually succeeded. Normally, it should redirect back to the previously accessed unauthorized page.

The following two test systems both have the same issue:
OS: ubuntu 24.04/22.04
Plone: 6.0.13/6.0.12
Volto: 17.8.12/17.15.2