The GFCI doesn't care a whit about the ground (earth) connection. It just looks for an unequal current flow between hot and neutral.

But if current is escaping to ground (earth) somewhere, that will trip a GFCI when the flow is high enough. Not because of the ground connection, but because the current flow on hot will be different than that on neutral.