Let $L$ be a Lie algebra. It is known that $L$ admits a Levi decomposition (possibly non unique):
$L=S\oplus rad(L) $,
where $rad(L)$ is the solvable radical and $S$ is a semisimple subalgebra.
If $L$ is reductive, this is, if
$rad(L)=Z(L)$,
where $Z(L)$ is the center, then $S$ is an ideal.
Is the converse true? Or is it possible to exhibit a non reductive Lie algebra that admits a Levi decomposition such that $S$ is an ideal?
(edited) Is there any method to determine whether is possible to have $S$ as an ideal or not?
Remarks: $L$ is finite dimensional and the underlying field is algebraically closed of characteristic $0$ . The direct sum sign means direct sum of vector subspaces.