Create a link using the render API
You will not be able to use a route, as /no-js would be its own route. Instead, you should use Url::fromUri. You should be able to use:

Url::fromUri('internal:/profile/publications/' . $user-&gt;id() . '/nojs');