The details really matter in a situation like this, so take anything that I say with a grain of salt.
However, based on what you share and absent additional facts, it appears that the teacher may be viewing things with too much academic tunnel vision.
In addition to Penny’s advice, I would share this with a school psychologist and/or school-based mental health practitioner and inquire about the potential for an social-emotional-behavioral disorder (or whatever the local lingo is in your state. In CA, it is officially called “Emotional Disturbance”).
This should push the right people on the team to look more holistically and not just from an academic lens.