4. Given that $P$ is any point inside triangle $A B C$ (excluding the boundary), and satisfies
$$
(\overrightarrow{P B}-\overrightarrow{P A})(\overrightarrow{P B}+\overrightarrow{P A}-2 \overrightarrow{P C})=0 \text {, }
$$

then $\triangle A B C$ must be ( ).
(A) a right triangle
(B) an equilateral triangle
(C) an isosceles right triangle
(D) an isosceles triangle
(4) Because
$$
\begin{aligned}
\overrightarrow{P B}-\overrightarrow{P A} & =\overrightarrow{A B}, \\
\overrightarrow{P B}+\overrightarrow{P A}-2 \overrightarrow{P C} & =\overrightarrow{C B}+\overrightarrow{C A},
\end{aligned}
$$

the given conditions can be rewritten as
$$
\overrightarrow{A B} \cdot(\overrightarrow{C B}+\overrightarrow{C A})=0 .
$$

It is easy to see that this triangle is an isosceles triangle.
Therefore, the answer is D.