Could it be related to test anxiety; or, could it be that the test is not provided in a way that student can demonstrate his/her mastry of a subject? Have you considered alternatives (e.g. for students who struggle with reading or writing sometimes the test can be read to them or they can provide oral responses)?
what jumps out at me in your post is that it does not translate in a written way. If your child knows the material and can reproduce it verbally or has performed better on verbal assignments it might be a case of NLD (non verbal learning difference).