Let $\mathfrak g$ be a complex linear Lie algebra. Assume that the center $\mathfrak z$ of $\mathfrak g$ is trivial
Let $\mathfrak r$ be the radical of $\mathfrak g$. If $\mathfrak r$ is abelian, then $\mathfrak g$ is semisimple?
What if $\mathfrak g$ is the Lie algebra of an algebraic complex linear group?
Your question whether $\mathfrak{g}$ is semisimple is equivalent to whether necessarily $\mathfrak{r} = 0$. The answer is no. A counterexample is given by
$$\mathfrak{g} = \left\{ \pmatrix{a & b & d\\ c& -a& e\\ 0&0&0} : a,b,c,d,e \in \Bbb C\right\}$$
where the radical $$\mathfrak{r} = \left\{ \pmatrix{0 & 0 & d\\ 0& 0& e\\ 0&0&0} : d,e \in \Bbb C\right\}$$ is two-dimensional.