Yes. We can shift.
THE CENTER OF GRAVITY OF A BODY IS THE POINT WHERE ALL FORCES ACTING ON THE BODY EQUAL ZERO.
— that the sum of all the forces acting on the body must equal zero.
If there is a downward-directed linear force, there must be an equal upward force so that the vector sum of these forces equals zero.
=> in your case when we apply external load to a substance, the sum of force acting on body is changes. That is the point where centre of gravity acted is shifted to another point.
Your doubt is correct. That the centre of gravity will shift when we apply external load. 👍👍