Yes, mosques were major centers of learning, and yes, madrasas were formal institutions of higher scholarship. No serious historian denies that. The question isn’t whether they were sophisticated or prestigious. They clearly were.
So, universities.
Madrasas generally operated through:
Endowments (waqf)
Individual scholars granting ijazahs (licenses to teach specific texts)
Study circles tied to particular teachers
Administrative oversight embedded in religious or political authority
Buddy. You just described Oxford, at least for the first couple hundred years. It's not 1:1, but it's very similar.
A single incorporated body of masters and students with collective legal standing
A standardized multi-faculty structure under one corporate identity
Degree hierarchies equivalent to bachelor/master/doctor conferred by the institution itself rather than by individual scholars
Oxford is to this day made up of 43 independent colleges that operate independently, which began as individual teachers teaching their subject. Incidentally, four of those are still today owned by religious institutions.
Do we define “university” broadly as any enduring institution of advanced learning that granted recognized credentials?
Or do we use the term in its specific medieval legal-institutional sense?
I feel like you intended this as a "gotcha," but that's literally what I mean by "no meaningful difference." Especially back in the first millennium.
If you choose the broader definition, then al-Qarawiyyin clearly qualifies very early.
If you choose the narrower juridical definition, then historians debate whether the madrasa structure fits that category prior to modern reforms.
Then you probably have to exclude every university prior to modern reforms. It's really not worth trying to split hairs for most schools.
In short, it's not a university. And that's okay. Trying to pigeonhole it into that definition is the issue.
Yeah, you really thought I was going to agree with you on the obvious answer there, but it really seems obvious to me in the opposite direction.