There's a inevitability about most scientific discoveries (there are notable exceptions but they are few) and unless we're talking about something with capital outlay in the trillions of dollars then it's going to happen whether we like it or not - short of a global totalitarian state capable of deep scrutiny of all research.
Because you can use this as a cop out for truly heinous work. I.e. gain of function research, autonomous weapons, chemical weapons, etc. It's not a coherent world view for someone that actually cares about doing good.
When research has an obvious and immediate negative outcome that's a cost. The difficulty/expense of the research is also a cost.
The "benefit" would be the incentive to know the outcome. This may be profit, military advantage, academic kudos etc.
Maybe the problem with the type of research being discussed here is that there isn't neccesarily any agreement that the outcome is negative. For many people, I suspect this will remove a lot of the weight on the "cost" side of things.
I'm not making a specific point here - I'm actually trying to work this out in my head as I write.