Required attributes are inferred as optional when generating types
<!--
Hello 👋 Thank you for submitting an issue.

Before you start, please make sure your issue is understandable and reproducible.
To make your issue readable make sure you use valid Markdown syntax.

https://guides.github.com/features/mastering-markdown/

Please ensure you have also read and understand the contributing guide.

https://github.com/strapi/strapi/blob/main/CONTRIBUTING.md#reporting-an-issue
-->

## Bug report

### Required System information

<!-- Please ensure you are using the Node LTS version (18, 20, or 22) -->
<!-- Strapi v3 is no longer supported, please update to Strapi v4 -->
<!-- If you are reporting a frontend bug please provide error logs after setting STRAPI_ENFORCE_SOURCEMAPS=true in your .env -->
<!-- This environment variable makes frontend errors easier to read and trace -->

- Node.js version: 18
- NPM version: 10.2.3
- Strapi version: 5.6.0
- Database: sqlite
- Operating system: macos 14.7.2
- Is your project Javascript or Typescript: Typescript

<!-- Did you know you can run `yarn strapi report` or `npm run strapi report` to get this information easier? -->

### Describe the bug

Attribute types for both Content-Types and Components are set as optional, even though they're marked as required when generating the types via `strapi ts:generate-types` command. The issue comes from the optional operator set it [here](https://github.com/strapi/strapi/blob/146a31b564bc8232686331f6b28f7ff966817963/packages/core/types/src/data/content-type.ts#L26C50-L26C55) and null type [here](https://github.com/strapi/strapi/blob/146a31b564bc8232686331f6b28f7ff966817963/packages/core/types/src/data/content-type.ts#L29)

### Steps to reproduce the behavior
1. Generate project types by running `npm run strapi ts:generate-types`
2. Update tsconfig to strict mode
3. Anywhere in your codebase, import Data type from `@strapi/strapi`
4. Create a variable and assign the type `Data.ContentType<'api::post.post'>` or `Data.Entity<'api::post.post'>`
5. Variable attributes are all optional

### Expected behavior

Required attributes should not be inferred as optional

### Screenshots
Generated types
![image](https://github.com/user-attachments/assets/e747effe-476e-45bc-ba28-f262c53e9e60)

As you can see in the image, all fields (including required fields like `title` and `seo`) are set as optional.
![image](https://github.com/user-attachments/assets/a4bf5739-ce3d-40d7-8110-73a7140b3f4a)
![image](https://github.com/user-attachments/assets/7353f48d-e2ec-44fb-8728-3e35a553b933)

### Code snippets

Example repo [here](https://github.com/LuizPelegrini/strapi-ts-issue)
