Redirect goes to homepage instead of expected location

Turns out this incredibly frustrating developer experience is at least a core bug, albeit one that’s been hanging around for quite a while:

Allow redirects repsonses to override ?destination query parameter

Workaround to the core bug:

return new TrustedRedirectResponse('', 302);

" If the route name is not known use RedirectResponse with a URL. When redirecting to an external location, use TrustedRedirectResponse."

drupal_goto() has been removed

Redirect to external URLs now requires a special object

Destination URL breaks preview