**Proposition.** Given a group $G$, this happens (every exact sequence $1\to G\to H\to H/G\to 1$ splits) iff $G$ has a trivial center and $1\to G\to \mathrm{Aut}(G)\to\mathrm{Out}(G)\to 1$ splits.

**Lemma:** Let $Z$ be embedded as central subgroup in two groups $G$, $S$, and let $H$ be the quotient of $G\times S$ by the diagonal $D_Z$ of $Z$. Then the extension $1\to G\to H\to H/G\to 1$ splits if and only if there exists a homomorphism $S\to G$ extending the identity of $S$.

*Proof.* Interpreting the existence of a splitting by pulling back in $G\times S$, we see that the exact sequence splits if and only if there exists a subgroup $L$ of $G\times S$ such that (a) the projection of $L$ on $S/Z$ is surjective, and such that (b) $L\cap (G\times Z)=D_Z$. Note that given (b), the condition (a) means that the projection of $L$ on $S$ is surjective. Thus a subgroup of $G\times S$ has this form if and only if it is the graph of a homomorphism $S\to G$ that is identity on $Z$. $\Box$

**Lemma:** Let $G$ be a group and $A$ an abelian group. Then there exists a group $S$ such that $S$ has no nontrivial quotient of cardinal $\le|G|$ and such that the center of $S$ contains an isomorphic copy of $A$.

**Proof:** for a field of characteristic zero $K$, consider the semidirect product $S_K=\mathrm{SL}_2(K)\ltimes\mathrm{Hei}_3(K)$ (this is a central extension by $K$ of the standard semidirect product $\mathrm{SL}_2(K)\ltimes K^2$; $\mathrm{Hei}$ refers to Heisenberg). This group has the property that every nontrivial quotient admits the simple group $\mathrm{PSL}_2(K)$ as quotient ($*$). Hence is has no proper quotient of cardinal $\le |K|$. Now the center of $S$ is isomorphic to $K$ as additive group, which is a vector space over $\mathbf{Q}$ which can be prescribed to be of arbitrary nonzero dimension. Since every abelian group $A$ is subquotient of a group of this form ($A$ is quotient of $\mathbf{Z}^{(A)}$ which is subgroup of $\mathbf{Q}^{(A)}$), it therefore embeds into some quotient of $S_K$ provided $K$ is large enough.

($*$) hint: use that the normal subgroups of $\mathrm{SL}_2(K)\rtimes K^2$ are $\{0\}$, $K^2$, $\{\pm 1\}\ltimes K^2$ and the whole group. To conclude, use that a normal subgroup whose projection modulo the center is the whole group $\mathrm{SL}_2(K)\rtimes K^2$ has to contain the center.$\Box$

**Lemma:** let $G$ be a group with nontrivial center $Z$. Then there exists a nonsplit extension $1\to G\to H\to H/G\to 1$.

**Proof:** choose for $A=Z$ a group $S$ as in the previous lemma. By the first lemma, the resulting central extension is not split, since a splitting would imply the existence of a quotient of $S$ of size between $|Z|\ge 2$ and $|G|$. $\Box$

**Proof of the proposition:** suppose that $G$ satisfies the splitting property. By the previous lemma, $G$ has trivial center. Hence the splitting of the exact sequence $1\to G\to \mathrm{Aut}(G)\to \mathrm{Out}(G)\to 1$ follows by assumption.

Conversely, suppose that $G$ has trivial center and this exact sequence splits. Let $1\to G\to H\to K\to 1$ be an exact sequence. Let $Z$ be the centralizer of $G$ in $H$. Then $N\cap G=1$. So this induces an exact sequence $1\to G\to H/Z\to K/Z\to 1$, which is split, so $H/Z=G\rtimes L/Z$ for some subgroup $L$ of $H$ containing $Z$. Hence $H:G\rtimes L$. $\Box$

Note that the construction of a "big" central extension as in the second lemma is disappointing if one wishes to somewhat preserve the cardinalities (which is not required by OP). It might be possible to improve this, but with some technical cost.

Note: (Oct 8 '21) I rewrote the proof since the initial one from Oct 7 '21 (when dealing with groups with nontrivial center) was fatally flawed; the issue was pointed out in comments by Mariano Suarez-Alvarez.