Programatically redirect to node/nid doesn't redirect to url alias
Try using Url.

$url = Url::fromRoute('entity.node.canonical', ['node' =&gt; $node-&gt;id()]);
new RedirectResponse($url-&gt;toString());