In the given diagram, it is $D^0$ that is at rest, not the individual quarks composing it. Within energy and momentum conservation, (even if there were not a sea of quark antiquark ant gluonand gluons in hadrons, example,) since the rest mass energy of the $D^0$ is larger than the masses of the two quarks , they are not at rest. In a funny Bohr like model the kinematics allows them to be orbiting around each other.
This is the wrong statement:
But clearly by the same assumption, since D0 is at rest in its own rest frame, also the initial u¯ must be at rest
The antiup is not at rest , as explained above.