Russian troops have been ordered to withdraw from the only Ukrainian regional capital seized throughout the war.