Some of the most widely misunderstood ideas in mathematics are to do with divergent series and about when it's applicable to assign a value to a series (see all the nonsense on this site about $-1/12$ everything else).
The point is: certain equalities only hold in certain places.
Imagine you've got a number line. Sometimes it's only valid to do a particular operation in one part of the number-line and outside of this region, it doesn't make sense. Your question is an example of this.
And yes, it's true that $1-\frac12+\frac14-\frac18+\ldots=\frac{2}{1+2}=\frac23$ but this doesn't necessarily generalise * to $1-2+4-8+\ldots$. Clearly the first series gets closer to $0.666\ldots$ as you add more terms but the second series doesn't get closer to anything, it just keeps going to $\pm\infty$. So the first series is called convergent (since it approaches something) and the second is called divergent (since it doesn't).
To be explicit, the series $1-x+x^2-x^3+\ldots$ is only equal to anything ** when $x$ is between $-1$ and $1$ (not including the endpoints $1$ or $-1$). In essence, the value of $x$ needs to be small enough so that when you add more terms in the series, the terms get smaller and smaller until they're effectively $0$.
There needs to be a limit of the series for it to be equal to anything. i.e. there needs to be a finite value that the series gets closer to.
Does this make sense?
For completeness, there are alternative definitions of summation (Abel, Cesaro, analytic continuation) that do allow for summation in places where it's normally undefined. But this is not the normal definition.
* it doesn't generalise from $x=2$ to $x=-2$
** only equal to any finite number, using normal (not Abel) summation