I was happy to learn here how to place "pullback-corner" decorations in tikz-cd squares using labels instead of phantom diagonals, but now I noticed that the label technique seems to affect the dimensions of the diagram. The code
\documentclass{article}
\usepackage{tikz-cd,amssymb}
\begin{document}
[
\begin{tikzcd}
U\cap V \ar[r] \ar[d] & V \ar[d] \
U \ar[r] & |[label={[label distance=-3mm]135:\ulcorner}]| P
\end{tikzcd}
\quad
\begin{tikzcd}
U\cap V \ar[r] \ar[d] & V \ar[d] \
U \ar[r] & P
\end{tikzcd}
\quad
\begin{tikzcd}
U\cap V \ar[r] \ar[d] & V \ar[d] \
U \ar[r] & P \ar[ul, phantom,"\ulcorner",pos=0]
\end{tikzcd}
]
\end{document}
produces the following diagram:
The left square, using label, is larger than the middle square without decoration, and the right square with the decoration placed on a phantom diagonal.
Is there a way to avoid this resizing?

overlaywith the label (label={[overlay]…}) so that it does not affect the bounding box of the cell. You can also use a “late label” as I call it, i.e. a label that is placed after the matrix has been constructed, basically\arrow[to path={node also[label=…]](\tikztostart)}](but we can make a nice style out of it), see my answer for a wider discussion about this. You can also usebetween originswith the column and row separation which will ignore everything in each cell. – Qrrbrbirlbel Aug 10 '23 at 23:53