That doesn't seem right.
In Gitlab: Right click the line number, choose Copy Link in the context menu. Two clicks.
In Github: Click the line, click the three dots, then click "Copy permalink". Three clicks. Alternatively, click the line, click the URL bar (or press F6 or ^L) copy the link. Still Three clicks.
What's the one-click method in GitHub I'm missing?
GitHub, by default, includes the commit hash. So the line of code will be the same at any point in the future: the file, at that line number, with that commit hash, is immutable (unless developers force push history rewrites, but you get my broader point).
To copy a link to a line of code, you can hover over the number next to the line of code and then copy a link to that line.
I created a gif to show what I mean: https://gitlab.com/johncoghlan/blog/-/raw/master/images/perm...
Or in the merge request widget, below the description: https://i.imgur.com/V72v9jj.png