[BUG] afterCreate lifecycle hook triggered despite unique constraint error
## Issue: `afterCreate` lifecycle hook triggered despite unique constraint error

### Description
When using `strapi.documents().create()` to create a new entry, the `afterCreate` lifecycle hook is still being called even when the creation fails due to a unique constraint violation.

### Expected Behavior
The `afterCreate` lifecycle hook should only be triggered when the document creation is successful. If the creation fails due to a unique constraint error, the `afterCreate` hook should not be called.

### Actual Behavior
The `afterCreate` lifecycle hook is being called even when the document creation fails due to a unique constraint violation.

### Env
Version            │ 5.6.0 (node v18.20.5)                            │
Edition            │ Community                                        │
Database           │ postgres                                         │

## Temporary Solution
To avoid the issue where the afterCreate lifecycle hook is triggered despite a unique constraint error, you can disable the "Draft and Publish" feature for the content type by setting "draftAndPublish": false in the content type's schema.json file.
```json
"options": {
    "draftAndPublish": true -> false
  },
```