redirecting in beforeLoader changes url but not the mounted component - TanStack