Complemented normal not implies direct factor

Statement
It is possible to have a group $$G$$ and a complemented normal subgroup $$H$$ such that $$H$$ is not a direct factor of $$G$$. In other words, $$H$$ has a permutable complement in $$G$$, but no normal complement in $$G$$.

Proof
We can take $$G$$ to be the dihedral group $$D_8$$ given as:

$$\langle a,x \mid a^4 = x^2 = e, xax = a^{-1} \rangle$$

and $$H$$ to be its unique cyclic maximal subgroup $$\langle a \rangle$$. Then $$\langle x \rangle$$ is a permutable complement to $$H$$ in $$G$$, but $$H$$ has no normal complement, so is not a direct factor.