Example 4 Let $z=\frac{\frac{\sin t}{\sqrt{2}}+\mathrm{i} \cos t}{\sin t-\mathrm{i} \frac{\cos t}{\sqrt{2}}}$, find the range of $|z|$.
$$
\begin{array}{l}
z \bar{z}=\frac{\frac{\sin t}{\sqrt{2}}+\mathrm{i} \cos t}{\sin t-\mathrm{i} \frac{\cos t}{\sqrt{2}}} \frac{\frac{\sin t}{\sqrt{2}}-\mathrm{i} \cos t}{\sin t+\mathrm{i} \frac{\cos t}{\sqrt{2}}} \\
=\frac{\sin ^{2} t+\cos ^{2} t}{2 \sin ^{2} t+\cos ^{2} t} \\
=-1+\frac{3}{1+\sin ^{2} t} \text {. } \\
0 \leqslant \sin ^{2} t \leqslant 1 \text {, } \\
\frac{1}{2} \leqslant|z|^{2} \leqslant 2 \Rightarrow \frac{1}{\sqrt{2}} \leqslant|z| \leqslant \sqrt{2} . \\
\end{array}
$$

Therefore