The only polynomials in $K[X]$ which have only $1$ as a root in the algebraic closure are of the form $(X-1)^n$ for some $n$.
Suppose for some $n$ the polynomial $(X-1)^n$ is of the form $X^m-1$ for some $m$. Expanding the power, we see that $$(X-1)^n=X^n+nX^{n-1}+\cdots,$$ with the omitted terms all of degree less than $n-1$, so if this is equal to $X^m-1$ then $n=m$ and $n=0$ in $K$, that is, the characteristic of $K$ divides $n$.
It follows that if a polynomial $X^m-1$ only has $1$ as a root in the algebraic closure of $K$, then $m$ is divisible by the characteristic of $K$.