7. Three people are playing a ball-passing game, starting from $A$, and the ball can be passed from $A$ to $B, C$, from $B$ to $A, C$, and from $C$ to $A, B$ with equal probability. Then the probability that the ball returns to $A$ after 2021 passes is $\qquad$ .
7. $\frac{1}{3}\left(1-\frac{1}{2^{2020}}\right)$.

Assume the probabilities of the ball being passed to $A$, $B$, and $C$ at the $n$-th pass ($n \geqslant 1$) are $a_{n}$, $b_{n}$, and $c_{n}$, respectively. Then,
$$
\begin{array}{l}
a_{n+1}=\frac{1}{2} b_{n}+\frac{1}{2} c_{n}, \\
b_{n+1}=\frac{1}{2} a_{n}+\frac{1}{2} c_{n} .
\end{array}
$$

By symmetry, we know $b_{n}=c_{n}$.
Thus, $a_{n+1}=b_{n}, a_{n+2}=\frac{1}{2} a_{n}+\frac{1}{2} a_{n+1}$.
The characteristic equation of this recurrence relation is
$$
\begin{array}{l}
x^{2}-\frac{1}{2} x-\frac{1}{2}=0 \\
\Rightarrow x_{1}=1, x_{2}=-\frac{1}{2} .
\end{array}
$$

Therefore, $a_{n}=\alpha+\beta\left(-\frac{1}{2}\right)^{n}$, where $\alpha$ and $\beta$ are constants to be determined.
$$
\begin{array}{l}
\text { Also, } a_{1}=0, a_{2}=\frac{1}{2} \\
\Rightarrow \alpha-\frac{1}{2} \beta=0, \alpha+\frac{1}{4} \beta=\frac{1}{2} \\
\Rightarrow \alpha=\frac{1}{3}, \beta=\frac{2}{3} \\
\Rightarrow a_{n}=\frac{1}{3}+\frac{2}{3}\left(-\frac{1}{2}\right)^{n} . \\
\text { Hence, } a_{2021}=\frac{1}{3}+\frac{2}{3}\left(-\frac{1}{2}\right)^{2021} \\
=\frac{1}{3}-\frac{1}{3} \cdot \frac{1}{2^{2020}}=\frac{1}{3}\left(1-\frac{1}{2^{2020}}\right) .
\end{array}
$$