Eric Wofsey's answer can be modified a bit to drop the assumption that we're dealing with the field $K=\mathbb{C}$. Let $K$ be an arbitrary field with $|K|>n$ (where $n \in \mathbb{N}$ is our matrix dimension) and suppose $T(I)=CD$ for some matrices $C$ and $D$. The claim is that there exists some invertible matrix $B$ such that $T: A \mapsto CB^{-1}ABD$ or $T: A \mapsto CB^{-1}A^tBD$.

*We can begin by proving that $T$ is injective (and hence bijective) by the same argument as given by Wofsey. We change from $T$ to $T:=T'(.)=C^{-1}T(.)D^{-1}$ such that $T(I)=I$.

*To show that $T$ preserves the rank of matrices, recall that a rank $m$ matrix can be written as $A=Q\Lambda$ where $\Lambda$ is nonsingular and $Q$ has precisely $m$ nonzero linear independent columns (the other columns being zero). With this in mind, we can see that for any matrix $A$
\begin{equation}
rank(A)=\max \left\{ m \in \mathbb{N}\left.\right| D \in M_n:\det (\lambda D + A)= c_{n-m}\lambda^{n-m}+...+c_n \lambda^n \text{ with }c_{n-m} \neq 0 \right\}.
\end{equation}
(If I'm correct, the assumption that $|K|>n$ is important here, in the sense that for a polynomial $P$ of degree $\leq n$ we have $P(\lambda)=0$ for all $\lambda \in K$ only if $P=0$. Hence polynomials $P$ are uniquely fixed by their evaluations $P(\lambda)$)

But from the bijectivity of $T$ it follows that
\begin{equation}
rank(A)=\max \left\{ m \in \mathbb{N}\left.\right| D \in M_n:\det (\lambda D + A)=\det (T(\lambda D + A))=\det (\lambda T(D) + T(A))= c_{n-m}\lambda^{n-m}+...+c_n \lambda^n \text{ with }c_{n-m} \neq 0 \right\}=
\max \left\{ m \in \mathbb{N}\left.\right| D \in M_n:\det (\lambda D +T(A))= c_{n-m}\lambda^{n-m}+...+c_n \lambda^n \text{ with }c_{n-m} \neq 0 \right\}=rank(T(A))
\end{equation}

*The last modification to make is to revise the proof that $T$ maps projectors on projectors of equal rank. It is sufficient to prove that $A$ is a projector of rank $m$ iff $A$ has rank $m$ and $I-A$ has rank $n-m$.

Proving the rightward implication is easy. For the leftward implication:
for any matrix $A$, we have the inclusion $\ker (A) \subset Ran (I-A)$ (easy exercise), which implies $\dim(\ker (A)) \leq \dim(Ran (I-A))$ where equality is attained iff $\ker (A) = Ran (I-A)$. By the dimension theorem, we then have that $n=\dim(Ran(A))+\dim(\ker(A))\leq \dim(Ran(A)) + \dim(Ran(I-A))$ with equality iff $\ker (A) = Ran (I-A)$. We conclude that
\begin{equation}
Rank(A)+Rank(I-A)=\dim(Ran(A))+\dim(Ran(I-A))=n \Rightarrow \ker (A) = Ran (I-A) \Rightarrow A(I-A)=0 \Rightarrow A\text{ is a projector}
\end{equation}