13. Given the function
$$
f(x)=4 \sin x \cdot \sin ^{2}\left(\frac{\pi}{4}+\frac{x}{2}\right)+\cos 2 x \text {. }
$$
(1) Let $\omega>0$, and be a constant. If the function $y=f(\omega x)$ is increasing on the interval $\left[-\frac{\pi}{2}, \frac{2 \pi}{3}\right]$, find the range of $\omega$;
(2) The sets are
$$
\begin{array}{l}
A=\left\{x \left\lvert\, \frac{\pi}{6} \leqslant x \leqslant \frac{2 \pi}{3}\right.\right\}, \\
B=\{x|| f(x)-m \mid<2\},
\end{array}
$$

If $A \cup B=B$, find the range of the real number $m$.
Three, 13. (1) Notice,
$$
\begin{array}{l}
f(x)=2 \sin x\left[1-\cos \left(\frac{\pi}{2}+x\right)\right]+\cos 2 x \\
=2 \sin x(1+\sin x)+\cos 2 x \\
=2 \sin x+1 .
\end{array}
$$

Given that $f(\omega x)=2 \sin \omega x+1$ is an increasing function on $\left[-\frac{\pi}{2}, \frac{2 \pi}{3}\right]$, then
$$
\begin{array}{l}
{\left[-\frac{\pi}{2}, \frac{2 \pi}{3}\right] \subseteq\left[-\frac{\pi}{2 \omega}, \frac{\pi}{2 \omega}\right] .} \\
\text { Hence } \frac{2 \pi}{3} \leqslant \frac{\pi}{2 \omega} \Rightarrow \omega \in\left(0, \frac{3}{4}\right] .
\end{array}
$$
(2) From $|f(x)-m|<2$, we get
$$
f(x)-2<m<f(x)+2 \text {. }
$$

Since $A \cup B=B$, then $A \subseteq B$, which means that when $\frac{\pi}{6} \leqslant x \leqslant \frac{2 \pi}{3}$,
the inequality
$$
f(x)-2<m<f(x)+2
$$

always holds. Therefore,
$$
(f(x)-2)_{\max }<m<(f(x)+2)_{\min } .
$$

Since $f(x)_{\text {min }}=f\left(\frac{\pi}{6}\right)=2$,
$$
f(x)_{\max }=f\left(\frac{\pi}{2}\right)=3 \text {, }
$$

thus, $m \in(1,4)$.