What is true is teachers overrate girl's performance earlier in school compared to boys, then girls catch up and overtake, often approaching their teacher's predictions. This might well be a case of matching expectations. Another, to me reasonable, explanation for the results is that teacher's grading includes potential, based on their experience. It's hard to know, and would be very hard to ethically test.
This area deserves more research, and less sgouty arguments, but there isn't a clear cut answer.