Being in debug mode is necessary to become superuser (whether on the login page or within the client), however because the becoming endpoint would straight redirect to the _login_redirect result the debug mode would be lost, which is commonly inconvenient. Replace the redirect_with_hash call by local_redirect, which goes through great pains to conserve the ?debug by default. Task 1908202 closes odoo/odoo#29058