Let $k$ a field. Let $\operatorname{char}(k) \not\mid n$.
Consider the two group schemes $\mu_n=spec(k[t]/(t^n-1))$ and $\underline{\mathbb{Z}/n\mathbb{Z}}$ the constant group scheme associated to the cyclic group ${\mathbb{Z}/n\mathbb{Z}}$. Are they isomorphic as group schemes? Do they become isomorphic when $k$ is algebraically closed?
It is false in general because $\mu_n(k)$ may not have $n$ elements. But when are they isomorphic?
As you note, this is false if the characteristic of $k$ divides $n$; indeed, one can observe this by computing the number of points over (say) $k_{\mathrm{sep}}$, or by noting that $\underline{\mathbb{Z}/n\mathbb{Z}}$ is an étale group scheme, whereas $\mu_{n}$ is étale if and only if $\mathrm{char}(k)$ does not divide $n$.
Hence, suppose that $\mathrm{char}(k)$ does not divide $n$. I claim that $\mu_{n}$ and $\underline{\mathbb{Z}/n\mathbb{Z}}$ are isomorphic if and only if $k$ contains all $n$th roots of unity, i.e. if and only if $t^{n}-1$ splits in $k[t]$.
Indeed, put $\Gamma_{k} = \mathrm{Gal}(k_{\mathrm{sep}}/k)$. There is an equivalence of categories between (affine) étale group schemes and finite groups with continuous $\Gamma_{k}$-action (by group homomorphisms). This correspondence is mentioned in several nice online notes: see page 24 here or page 206 here. However, the treatment I most prefer (though I'm a bit biased) is found on page 332 of "The Book of Involutions". I will reproduce some of the details here.
If $G$ is an étale group scheme, then $G(k_{\mathrm{sep}})$ is a finite (discrete) group with a continuous action of $\Gamma_{k}$. Conversely, let $H$ be a finite group with continuous $\Gamma_{k}$-action by group homomorphisms. Let $A = \mathrm{Map}(H, k_{\mathrm{sep}})$ be the $k_{\mathrm{sep}}$-algebra of set maps $H \to k_{\mathrm{sep}}$. Then $A$ admits a $\Gamma_{k}$-action given on $f \in A$ by
$$(\gamma f)(h) = \gamma f (\gamma^{-1}h)$$
for $\gamma \in \Gamma_{k}, h \in H$. Then one can check that $A^{\Gamma_{k}}$ is an étale Hopf $k$-algebra. It is étale by Galois descent: the isomorphism
$$A^{\Gamma_{k}} \otimes_{F} k_{\mathrm{sep}} \to A, f \otimes x \mapsto xf$$
of $k_{\mathrm{sep}}$-vector spaces is easily seen to be a morphism of $k_{\mathrm{sep}}$-algebras, and $A$ decomposes as $\prod_{h \in H} k_{\mathrm{sep}} \cdot e_{h}$, where $e_{h}$ is the characteristic function on $h$. One can check that $A^{\Gamma_{k}}$ is a Hopf-algebra via the co-multiplication, co-inversion and co-unit morphisms for constant group schemes (let me know if this point is unclear; I am being a bit imprecise).
Under this equivalence of categories, constant group schemes are correspond to finite groups with trivial $\Gamma_{k}$-action. Hence, one can see that $\mu_{n}$ is constant precisely when $\mu_{n}(k_{\mathrm{sep}}) = \{x \in (k_{\mathrm{sep}})^{\times} \mid x^{n} = 1\}$ has trivial $\Gamma_{k}$ action, which occurs precisely when all $n$th roots of unity belong to $k$.