Given a connected Lie group $G$ with corresponding Lie algebra $\mathfrak{g}$, the adjoint representation/action $\mathrm{Ad} : G \to \mathrm{GL}(\mathfrak{g})$ induces a Lie group homomorphism. It's well-known that $\ker{\mathrm{Ad}} = Z(G)$, and that if $G$ is semisimple, then $\mathrm{Ad}(G)$ is the identity component of $\mathrm{Aut}(\mathfrak{g})$, and is in particular closed, which gives us that $G/Z(G)$ is an embedded submanifold.
I would like to know if this is true in general. That is, without assuming $G$ is semisimple, does $\mathrm{Ad}$ gives us the (manifold) embedding $G/Z(G) \hookrightarrow \mathrm{GL}(\mathfrak{g})$ (or, in other words, is $\mathrm{Ad}(G)$ a closed submanifold of $\mathrm{GL}(\mathfrak{g})$)?