I'm asking if it's unethical to sell someone a gun if you're convinced they're going to do something you believe to be unethical with it. I would say yes. I'm not sure if you would say, "no, it doesn't matter if I know they're going to kill children with it", "maybe, if I only think they're going to kill animals with it", or "yes, I don't think I should sell them the gun if I know they're going to do something I don't approve of with it".
To your second point, we're not talking about "maybe they're going to do something bad", we're saying "here's plenty of documentation that they're going to do something bad".
I don't like this contrived example though, and I suspect you've only set it up so that if/when I say "nope, I won't sell the gun to that person" you'll then say "in this case the gun is GitHub and the felon trying to buy it is ICE" which I do not think is an apt analogy at all.
And would you have the same answer if you believed that law enforcement wouldn't do anything to stop the buyer from doing anything?