Interestingly, Werner Heisenberg was decidedly non-Nazi (and was regularly attacked as a “white jew”), and even though he had ample opportunity to leave, he chose to stay to work on the German nuclear fission program.
I don’t think it tarnished his scientific legacy, but it definitely created some friction in the post-war years.