During the Manhattan Project some were motivated by solving a technological frontier and didnt really think about the consequences.
But others, best exemplified by Edward Teller, didn't concern themselves with such liberal arts nonsense, and merrily continued building larger and larger (and–actually more dangerous–smaller) bombs after Germany was long defeated, and before the Cold War's weapon's race had begun.
And, of course, the Trinity test mentioned above only happened three months after Germany's capitulation. Since afaik none of the scientists quit and the Manhattan project continued unabated, the idea that it was solely motivated by the fear of a German bomb seems somewhat...strained.