This is because Ksp of CuS is very low as compared to that of ZnS. Therefore, a low concentration of S2− ions can precipitate Cu2+ ions as CuS, whereas, a high concentration of S2− ions is required to precipitate Zn2+ ions as ZnS.
Now, in presence of an acid i.e., HCl dissociation of H2S is suppressed due to common ion effect.
HCl⇌H++Cl− (strong electrolyte)
H2S⇌2H++S2− (weak electrolyte)
As a result, in acidic solution copper will precipitate as CuS but not the Zinc as ZnS.