The point is that there is no one-to-one correspondence between the dof coordinates and the mesh vertices, as illustrated by the plots on DefElement. A second order space has dofs on the facets and vertices. If you want to have only values at the nodes, you could interpolate your CG-2 solution into CG-1.
See for instance: Mapping of results to mesh nodes, debugging of dolfinx implentation of shell formulation - #6 by dokken and the previous posts in that thread