I'm not sure how the object IDs are generated, but I would not expect the objects created in separate ISE clusters to have the exact same object ID if the name is the same.
The only suggestion I would have is to rewrite your code so that it first gets the object ID of the Identity Group, stores that as a variable, then uses that variable when making changes.