If you duplicate the unapplied layrComp, then it is duplicated and a checkmark is displayed that it is applied.
In fact, this is not always true.
Checking is very simple. Turn off all layers. Create a new layerComp. Turn on all layers. layerComp will become unapplied. Duplicate layerComp using the context menu. The new layerComp will be marked as applied. But this is not true. All layers are turned on.
Reformulate please. I misunderstood the question (in English).
If something: The action is just an example, that if you quickly create LayerComps (for example, in a script), then they get the same ID, as if it takes the current seconds of time as the basis for creating the ID.