When you pack the PCK, you specify the root folder that will be packed with the hierarchy preserved. First, unpack the PCK somewhere, then change the contents of the extracted files and specify the same folder when packing.
- But there are problems here:
Firstly, usually exported resources/textures are not located like
res://Graphic/icon.png'. This path usually contains a remap file that references file inside
.godot/imported`. - Secondly, this image can be loaded from the script, which will also have to be changed.