This equation only works for objects close to the Earth’s surface where we can consider the gravitational field to be uniform. In A2 level, you will consider examples where the gravitational field is not uniform such as in space, where this equation for GPE will not be relevant.