The equality you state is not true in general. An object $(c,f,d)$ of the comma category consists of an object $c$ of $C$, an object $d$ of $D$, and a morphism $f \colon Fc \longrightarrow Gd$ in $E$. The projection functors $\pi_1$ and $\pi_2$ send this object to $\pi_1(c,f,d) = c$ and $\pi_2(c,f,d) = d$, so we have $(F\circ\pi_1)(c,f,d) = Fc$ and $(G\circ\pi_2)(c,f,d) = Gd$, which are not equal in general. They will be equal if $E$ is discrete, in which case the comma category is the pullback.

What is true in general is that there is a natural transformation $\lambda \colon F\circ\pi_1 \longrightarrow G\circ\pi_2$. The component of $\lambda$ at the object $(c,f,d)$ of $F \downarrow G$ is the morphism $f \colon Fc \longrightarrow Gd$ in $E$. This natural transformation is part of the structure of the comma category as a weighted limit, as I will now spell out.

The limit of a $2$-functor $J \colon \mathcal{A} \longrightarrow \mathcal{B}$ weighted by a $2$-functor $W \colon \mathcal{A} \longrightarrow \mathbf{\text{Cat}}$ consists of an object $\{W,J\}$ of $\mathcal{B}$ together with a ''universal cylinder'', which is a $2$-natural transformation $W \longrightarrow \mathcal{B}(\{W,J\},J-)$ such that the induced composite functor
$$ \mathcal{B}(B,\{W,J\}) \longrightarrow [\mathcal{A},\mathbf{\text{Cat}}](\mathcal{B}(\{W,J\},J-),\mathcal{B}(B,J-)) \longrightarrow [\mathcal{A},\mathbf{\text{Cat}}](W,\mathcal{B}(B,J-))$$
is an isomorphism of categories.

(Note that if $\mathcal{A}$ is a category, then these $2$-functors and $2$-natural transformations just amount to functors and natural transformations respectively.)

Now let $\mathcal{A}$ denote the free category on the graph $\bullet \longrightarrow \bullet \longleftarrow \bullet$.The comma object $f/g$ of a cospan $f \colon A \longrightarrow C \longleftarrow B \colon g$ in a $2$-category $\mathcal{B}$ is the limit of the corresponding functor $J \colon \mathcal{A} \longrightarrow \mathcal{B}$ weighted by the functor $W \colon\mathcal{A} \longrightarrow \mathbf{\text{Cat}}$ that picks out the cospan $\bot \colon 1 \longrightarrow \mathbf{2} \longleftarrow 1 \colon \top$, where $\mathbf{2}$ denotes the free category on the graph $\bot \longrightarrow \top$. The universal cylinder for this weighted limit is a natural transformation as displayed in the commutative diagram
$$
\require{AMScd}
\begin{CD}
1 @>\bot>> \mathbf{2} @<\top<< 1\\
@VpVV @VV\lambda V @VVqV\\
\mathcal{B}(f/g,A) @>>\mathcal{B}(1,f)> \mathcal{B}(f/g,C) @<<\mathcal{B}(1,g)< \mathcal{B}(f/g,B)
\end{CD}$$
in $\mathbf{\text{Cat}}$,
which amounts to a $2$-cell $\lambda \colon fp \longrightarrow gq$ in $\mathcal{B}$ as in the following diagram.
$$
\require{AMScd}
\begin{CD}
f/g @>q>> B \\
@VpVV \Longrightarrow @VVgV \\
A @>>f> C
\end{CD}
$$