First of all, there are examples for semi-direct products, but maybe this is not what you want.

1) Let $F_m$ be the free group on $m$ generators. Given a surjection $\varphi: F_m \rightarrow F_n$, we obtain a short exact sequence
$$ 1 \rightarrow N \rightarrow F_m \xrightarrow{\varphi} F_n \rightarrow 1. $$
Here, $N$ is free and $F_m \cong N\rtimes F_n$.

Hence, $\mathrm{cd}(N\rtimes F_n)=1$, but $\mathrm{cd}(N\times F_n)=2$.

2) Stallings example: Let $F_2$ be the free group on two generators and consider the short exact sequence
$$ 1 \rightarrow H \rightarrow F_2 \times F_2 \rightarrow \mathbb{Z} \rightarrow 1 $$
obtained by sending the generators of $F_2$ to 1, in both factors. Then $H$ is not a free group and $ F_2 \times F_2\cong H\rtimes \mathbb{Z}$.

One has $\mathrm{cd}(H\rtimes \mathbb{Z})=2$, but $\mathrm{cd}(H\times \mathbb{Z})=3$.

Secondly, a knit product of two torsion-free groups does not have to be torsion-free.
Hence, one cannot expect the inequality $\mathrm{cd}(A\bowtie B)\leq \mathrm{cd}(A)+\mathrm{cd}(B)$ to hold in general.

It is not difficult (but a little tedious) to construct an example of a group of the form $\mathbb{Z}\bowtie \mathbb{Z}$, with an element of order two. Keep in mind for this that the knit products $\mathbb{Z}\bowtie \mathbb{Z}$ have been classified (see this MathStack post for some references https://math.stackexchange.com/questions/107781/has-this-generalized-semidirect-product-been-studied/107788#107788). They always fit in a short exact sequence
$$ 0 \rightarrow \mathbb{Z}^2 \rightarrow \mathbb{Z} \bowtie \mathbb{Z} \rightarrow \mathbb{Z}_2 \oplus \mathbb{Z}_2 \rightarrow 0. $$