Consider the semidirect product $H⋊ K$ of the groups $H$ and $K$.
We know that given a group $G$ such that $H,K\leq G$, we can recognize that it is the semidirect of $H$ and $K$ provided that (i) $H\cap K=1$, (ii) $HK=G,$ and (iii) $H$ is normal in $G$.
But, going the other way, can we always conclude that given $H⋊ K$, we have an isomorphism between $H⋊ K$ and $HK$? We know that $H$ and $K$ have isomorphic copies in the semi direct product that satisfy (i) and (iii). But I can't see if it will follow that there is an isomorphism between $H⋊ K$ and $HK$.
In general, when we write $$ H\rtimes K $$ It means that the underlying set is $H\times K$ and we have a homomorphism $K\rightarrow\operatorname{Aut}(H)$. This homomorphism is used to define the product.
If $G$ is a semidirect product, then the map $K\rightarrow\operatorname{Aut}(H)$ can be seen in conjugation: $h\mapsto khk^{-1}$.
In order for there to be an isomorphism as you describe, the maps to $\operatorname{Aut}(H)$ must agree.