It's a bit unclear where the origin is, but the thing that comes to mind immediately is that the cube file is exported with the grid elements in Bohr, while the XYZ has coordinates in Angstrom. That should however perhaps give a much larger shift, a factor 2 basically, but you can check if it solves anything to convert the coordinates.