I am not saying it’s true in your case, but when that happened to me, I often found that I was a bit too overconfident and didn’t give enough thought or take enough care in my answers or reading the questions.
I found during school that second-guessing myself usually led to the wrong answer. However, if you’re seeing results that don’t align with your expectations maybe you need to do a better job of slowing down, thinking through your answers, and reviewing them before you turn in an exam. That might help.