In my university course, we were given the following proof of the Cauchy-Schwarz Inequality:

My issue is with the last line, surely we get that:
$$|E(XY)| \leq \sqrt{E(X^2)E(Y^2)}$$ but it is not true in general that $E(|XY|)\leq |E(XY)|$
Any help would be much appreciated.
The result follows from the fact that X and Y are assumed to be non-negative, as stated in the first line.