Context filter in the URL via Twig

Does any of you know how to create a link as described in # 9 in

I tried this way

Contextual filter in URL via Twig

but the exit ends with a "?" … like me 🙂 The link to the node works, but the query / argument / context filter is missing in the URL. How can I fix this?