As noted in Tag 01WZ of Kerodon, the morphism spaces of an $(\infty,2)$-category $C$ can fail to be $\infty$-categories, in contrast to the pinched morphism spaces of $C$.
This feels very counterintuitive to me, as the only difference between the former and the latter is that morphism spaces have in a sense "two times as many homotopies" than the pinched morphism spaces: for instance, the 1-simplices of $Hom(A,B)$ look like this:
i.e., a divided square with two 2-simplices, one from $id_Y\circ f$ to $h$ and then one from $h$ to $g\circ id_X$.
Meanwhile, the $1$-simplices of $Hom^L(A,B)$ look like the right-top triangle in this square, with a 2-simplex from $id_Y\circ f$ to $h$, and similarly the $1$-simplices of $Hom^R(A,B)$ look like the left-bottom triangle in this square, now with a 2-simplex from $h$ to $g\circ id_X$.
How should one think about this fact, intuitively? Say, is there some illuminating example illustrating what goes wrong for morphism spaces compared to pinched morphism spaces?
Second, I'm also wondering about whether this problem might be "rectifiable" in the following sense: is there an appropriate notion of "weak equivalence" of $(\infty,2)$-categories making the following statement true?
Given any $(\infty,2)$-category $C$, there exists an $(\infty,2)$-category $C'$ such that
- The morphism spaces of $C'$ are $\infty$-categories;
- The $(\infty,2)$-categories $C$ and $C'$ are weakly equivalent.
Edit: As noted in Tim Campion's excellent answer, the appropriate notion of morphism spaces for $(\infty,2)$-categories should be the right adjoint to the Gray tensor product. However, the morphism spaces defined by Lurie don't seem to be too far from the correct Hom, as they already encompass lax squares to some extent.