If you're unable to do that for some reason (e.g. iOS), check out the Kill Sticky bookmarklet, which at least lets you nuke these quickly and with consistent muscle memory. It also gets rid of those trashy sticky headers. https://www.smokingonabike.com/2024/01/20/take-back-your-web...
NoScript also does a good job of preventing this garbage. It can be a bit of effort to use, but I find it worth the effort.
If none of these work, then take that as a signal that the content is not worth viewing, close the tab, and move on with your life.
“Close the tab and move on” is what I've been doing. I'm just suggesting that HackerNews might be a better website if that weren't necessary.
Thanks for the other suggestions. I'm not sure if I can use bookmarklets on mobile (Fennec) but I'll look into it.