How should a teacher deal with this? It keeps happening, children are giving answers that correspond with 2nd Century science because the students are told that the beliefs of certain religious thinkers are to be held as inviolable.
As Straggler already stated Science class is about showing you understand what's taught in science, regardless of whether or not you accept it. So if a student persistently answers questions which are some variant of 'god did it' in exams, the teacher has every right to give them a poor mark.
But suppose the teacher did consider a students religious leanings and gives more favourable marks, what about the other 75% of students who do make the effort to study hard and understand the science as taught? Would they feel cheated, maybe not putting the same effort into learning the subject in future? After all it is just science, they are only learning 'theories' we don't know any f this for certain, and it could all have been different in the past anyway.
What if the religious student obtained a passing mark in science class because of this policy and based on this decide to take it in university. Should the university accept the student, given that they may need to reiterate basic highers or even standard grade level biology, holding back other students; or should they increase the minimum entrance requirements, which would have the side effect of making it harder for student with a genuine interest in science to get in?
I realise that these may be worst case scenarios, but it does suggest the more wide-reaching detrimental effects that could potentially occur.