\href should not affect spacing inside it.
However, href builds expression with isRealGroup = false, but it doesn't get flattened in its parent buildExpression and spacings inside \href are not added.
a \href{.}{+b}

(Black a and purple is KaTeX and black is LaTeX.)