In Genesis 6:3, God’s decision to remove His spirit from the presence of man seems to be linked to the Nephilim, since it is right between the Angels (“sons of God”) taking humans as wives and the Nephilim that those unions produced. The purpose of the Flood was to wipe out all of corrupted humanity, which would include the Pre-Flood Nephilim. While one could suggest that the Angels and the Nephilim may have had a serious contribution to the corruptness of mankind, it was not its overall cause.
The simple answer about the Post-Flood Nephilim is they are not the same as the Pre-Flood Nephilim. Nephilim is an Hebraized Aramaic word that simply means “giant.” Ge 6:4 simply means there were giants before the Flood and there were giants after the Flood, it does not mean that the Pre-Flood giants lived through the Flood, since that would contradict Ge 7:23 “He blotted out every living thing that was on the face of the ground, man [including the Nephilim] and animals and creeping things and birds of the heavens.” The post-Flood Nephilim were a different group of giants, whose origins are not discussed in scripture (though one could presume that another group of Angels came down after the Flood and took Canaanites as wives).