CPEC projects are not solely financed by Chinese government grant. Some are through commercial lending. Also even if a specific project is financed purely by Chinese government grant, it may be awarded to a Pakistani engineering company who happens to have many old machines from over non-Chinese vendors decades ago. In all these cases above, Pakistan do have a final say what machine to use, after all nobody can ask anybody to dump the working old Hitachi and buy brand new Sany, that is waste of money which could be Chinese money.
Besides, a search through this forum shows lots of flashy machines from Sany, XCMG and LIUGONG in CPEC projects.