I was reading the following result from the book Metric spaces of non-positive curvature by Bridson and Haefliger.
Result: Let $F_0,F_1$ and $H$ be groups acting properly by isometries on complete $CAT(0)$ spaces $X_0, X_1$ and $Y$ respectively. Suppose that for $j=0,1 $ there exists a monomorphism $\phi_j:H \to F_j$ and a $\phi_j$-equivariant isometric embedding $f_j:Y\to X_j$. Then
(1) the amalgamated product $G=F_0\ast_H F_1$ associated to the maps $\phi_j$ acts properly by isometries on a complete $CAT(0)$ space $X$;
(2) if the given action of $F_0$, $F_1$ and $H$ are cocompact, then the action of $G$ on $X$ is cocompact.
I'd be happy to see proof of the above result for $CAT(0)$ (finite dimensional if needed) cube complexes with the same hypothesis as above. If it is false what may go wrong?
From a quick google search I found the paper "Cubulating malnormal amalgams" by Hsu and Wise (https://link.springer.com/article/10.1007/s00222-014-0513-4) and saw a similar result (see Theorem A) but with extra assumsions like resulting group is hyperbolic relative to free abelian and the edge group hyperbolic, quasi-convex, malnormal etc.
What may go wrong if we simply try to extend the above result for $CAT(0)$ cube complexes without assuming these conditions of Theorem A (by Hsu & Wise)?
I think the edge subgroup must act on a convex subset (that sits inside both the bigger cube complexes) such a way that hyperplanes are "merged" in both the other spaces while patching or some sort of wall compatibility condition must be satisfied.