It can't be prevented on a technological level.
However there are attempts to detect bad nodes and ban them. Since the exit node doesn't know "who" is accessing the website it can't just temper with your content. So it would be detected asymptomatically.