Assuming $D$ is a square matrix where $D^2 = D$ why is $D$ not equal to the Identity matrix.
Assuming $I$ is the identity matrix then why is the following not true.
$D^2 = D$
$DD = D$
$D^{-1}DD =D^{-1}D$
$ID = I$
$D = I$
As far as I can see, this should be true. But if D = $\begin{bmatrix}\frac{1}{2}&\frac{1}{2}\\\frac{1}{2}&\frac{1}{2}\end{bmatrix}$. Then $D^2=D$ still holds true yet D is not the identity matrix.
Matrices, that fulfill $D^2=D$ are projections. There is only one projection, that maps into the whole vector-space. It's the identity. Your example projects everything on the space spanned by $\begin{pmatrix}1\\1\end{pmatrix}$ and is not invertible.
In your derivation you asusmed the matrix to be non-singular, but is (basically) never the case in projections.