Interesting I was diagnosed with ADHD and always felt the teacher was stupid for making us hand write because I spent more time focusing on the writing than remembering what I had written down (and I thought this was likely the case for most people)… but never knew these two things could be related.
I had the same problem, and unfortunately continued taking handwritten notes well into college, despite the fact that I literally never referenced my notes. I never knew what the point was, only that if I didn't take notes I'd be "breaking the unwritten rule".
The only point of creating any sort of reference material is to increase the likelihood that you'll be able to recall the information later. Handwritten notes are one of the many possible ways to do this. I find that re-designing an abbreviated textbook and splitting all information into tables is the only way that I can reliably learn, but I didn't think of that in school and thus struggled some with grades.
As a fellow ADHD-er, the way I handled this as a student was to customize my note-taking system. My whole life people had told me how to take notes in an extremely structured way, and insisted they must be detailed. That required so much focus like you that I couldn't learn. So when I was allowed to stop taking notes, I did, and my grades slightly improved.
Then in university it was too much information to not take notes, and I started on my own again, in my own way. Most importantly there was almost no structure, and very little detail. Never take notes in full sentences, just keywords that are semi-digestable to you, and in math there were lots of equations and diagrams. Secondly I got a tablet with a pressure sensitive pen. This allowed me to still take hand "written" notes that looked and felt like my real handwriting, but I didn't have to deal with trying to organize my notes in real space, which inevitably would end up crushed at the bottom of my backpack or strewn around my room; digital notes are self-organizing.
Sounds like you were primarily having trouble balancing focus with the content side of making notes. With many people, the challenge is actual mark making. We need to intellectualize writing words the way I've heard some people with autism need to intellectualize ingesting and responding to social queues. That muscle memory just doesn't connect the way it does for most people... it's like I'm using the mental process for drawing and don't have some parallel, more automatic mental process for writing. For me, typing is an instant cure for that.