Question on functional derivatives

For a real quantity, its absolute value should be equal to the square-root of the quantity squared.
Thus, in the example below (i.e., for |u’(x)|), why do I get different functional derivatives? What do I miss something? What is the correct answer?

Needs["VariationalMethods`"];

A = Sqrt[D[u[x], x]^2];

B = Abs[D[u[x], x]];

dA = VariationalD[A, u[x], x]

dB = VariationalD[B, u[x], x]

The function Abs is treated as nondifferentiable by Mathematica, because in the complex plane it is indeed not differentiable in the complex sense. Try RealAbs instead of Abs:

VariationalD[RealAbs[u'[x]], u[x], x]