The code
\documentclass{article}
\begin{document}
$\widehat{\mathcal{C}_0}$
$\widehat{\mathcal{D}_0}$
\end{document}
I never noticed this effect before, but it seems like the hat on the D is much wider, probably because the letter is wider on top?
Is there a way to make the difference less extreme?

\widehat{\mathcal{C}}_0and\widehat{\mathcal{D}}_0. – Werner Dec 20 '23 at 05:35