5. In the right triangle $ABC (AC > BC)$, $\angle C = 90^{\circ}$, point $D$ is on $AC$, and $CD = CB = 2$, $DE \parallel BC$ intersects $AB$ at point $E$, $F$ is the midpoint of $CD$, and $\angle BEF = \angle B$. Then the length of $DE$ is ( ).
(A) $\frac{2}{3}$
(B) 1
(C) $\frac{4}{3}$
(D) $\frac{5}{3}$
5. C.

As shown in Figure 2, take the midpoint $G$ of $BE$, and connect $GF$. Then
$GF \parallel BC \parallel DE$,

and $GF=\frac{1}{2}(DE + BC)$.
Therefore, $\angle FGE$
$$
=\angle B=\angle BEF \text{. }
$$

Thus, $GF=EF$.
Let $EF=x$. Then $DE=2GF-BC=2x-2$.
In the right triangle $\triangle DEF$, $DF=\frac{1}{2}CD=1$.
By the Pythagorean theorem,
$$
DE^2 + DF^2 = EF^2,
$$

which is $(2x-2)^2 + 1^2 = x^2$.
Solving this, we get $x=\frac{5}{3}$ or 1.
When $x=\frac{5}{3}$, $DE=2x-2=\frac{4}{3}$;
When $x=1$, $DE=2x-2=0$ (discard).
Therefore, the length of $DE$ is $\frac{4}{3}$.