Example 3 Given the equation in $x$
$$
x^{3}-a x^{2}-2 a x+a^{2}-1=0
$$

has exactly one real root. Find the range of real values for $a$.


【Analysis】Regarding the cubic equation in $x$ as a quadratic equation in $a$.
The original equation is transformed into
$$
a^{2}-\left(x^{2}+2 x\right) a+x^{3}-1=0 \text {. }
$$

Solving for $a$ yields $a=x-1$ or $a=x^{2}+x+1$.
Since the original equation has only one real root, the equation $a=x^{2}+x+1$ in $x$ has no real roots.
Thus, $\Delta=1-4(1-a)<0$.
Therefore, $a<\frac{3}{4}$.