oshrirozmarin the admin route is blocked via a middleware, so it's not possible to fix this with just a frontend extension.
The easier would be to install the direct-links extension, then via extend.php define a new middleware that will replace unauthorized responses with a redirect to /login.