when the same Aggregate is created twice, the Event Store (when using event sourcing) will reject the Event, as one already exists with the same Aggregate Identifier and sequence number (the creation event always has sequence 0).
If you don’t use event sourcing, the specific Repository implementation should ensure that the identifier is unique, and inserting a second entry with the same identifier fails.