While I was answering another question, I realized that when the option every matrix/.style={name=...} is added to a tikz-cd environment, some spurious spaces appear, see the following MWE:
\documentclass{article}
\usepackage{tikz-cd}
\usepackage{mwe}
\begin{document}
The difference between these commutative diagrams:
\begin{tikzcd}[execute at end picture={
\filldraw[red] (\tikzcdmatrixname-1-1) circle[radius=1pt];
\filldraw[blue] (\tikzcdmatrixname-1-2) circle[radius=1pt];
\filldraw[green] (\tikzcdmatrixname-2-1) circle[radius=1pt];
\filldraw[orange] (\tikzcdmatrixname-2-2) circle[radius=1pt];
}]
A \ar[r]\ar[d] & B \ar[d] \\
C \ar[r] & D \\
\end{tikzcd}%
\begin{tikzcd}[execute at end picture={
\filldraw[red] (\tikzcdmatrixname-1-1) circle[radius=1pt];
\filldraw[blue] (\tikzcdmatrixname-1-2) circle[radius=1pt];
\filldraw[green] (\tikzcdmatrixname-2-1) circle[radius=1pt];
\filldraw[orange] (\tikzcdmatrixname-2-2) circle[radius=1pt];
}]
A \ar[r]\ar[d] & B \ar[d] \\
C \ar[r] & D \\
\end{tikzcd}%
and the following two is only the \texttt{every matrix/.style=\{name=...\}} option, which produces some spurios spaces, as you can easily see:
\begin{tikzcd}[every matrix/.style={name=mycd},
execute at end picture={
\filldraw[red] (mycd-1-1) circle[radius=1pt];
\filldraw[blue] (mycd-1-2) circle[radius=1pt];
\filldraw[green] (mycd-2-1) circle[radius=1pt];
\filldraw[orange] (mycd-2-2) circle[radius=1pt];
}]
A \ar[r]\ar[d] & B \ar[d] \\
C \ar[r] & D \\
\end{tikzcd}%
\begin{tikzcd}[every matrix/.style={name=mycd},
execute at end picture={
\filldraw[red] (mycd-1-1) circle[radius=1pt];
\filldraw[blue] (mycd-1-2) circle[radius=1pt];
\filldraw[green] (mycd-2-1) circle[radius=1pt];
\filldraw[orange] (mycd-2-2) circle[radius=1pt];
}]
A \ar[r]\ar[d] & B \ar[d] \\
C \ar[r] & D \\
\end{tikzcd}%
Is there any \texttt{\%} missing somewhere?
\end{document}

