Repository: material-ui
Issue: Using extended styles with styled-components breaks types
Labels: bug 🐛,typescript,package: styled-engine-sc

### Steps to reproduce

Link to live example: https://stackblitz.com/edit/vitejs-vite-afbuyz?file=src%2FApp.tsx&view=editor

Steps:
1. Use MUI with styled-components (https://mui.com/material-ui/integrations/styled-components)
2. Use extended styles with styled (https://styled-components.com/docs/basics#extending-styles)


### Current behavior

- No Intellisense is displayed.
![image](https://github.com/user-attachments/assets/743c2db9-d47b-4d1d-88a3-36ceecd391b6)
- No warning if the wrong property is assigned.
    - It should be "outline**d**"
![image](https://github.com/user-attachments/assets/ec5a7506-92ba-4f50-8054-c07ec6b754c5)


### Expected behavior

The types are correct even if extended styles are used.

### Context

- There is no problem using styled-components directly.
- There is no problem with styled when using emotion.

The types change when using extended styles.


#### styled
![image](https://github.com/user-attachments/assets/21e1096c-11eb-406c-9332-9c67e5013449)

#### extended
![image](https://github.com/user-attachments/assets/236c2f2b-15de-43f1-81fe-fd93a86d1352)


### Your environment

<details>
  <summary><code>npx @mui/envinfo</code></summary>

I used Chrome: 130.0.6723.70

```
  System:
    OS: Linux 5.0 undefined
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  Browsers:
    Chrome: Not Found
  npmPackages:
    @mui/core-downloads-tracker:  6.1.5 
    @mui/material: latest => 6.1.5 
    @mui/private-theming:  6.1.5 
    @mui/styled-engine:  6.1.5 
    @mui/styled-engine-sc: latest => 6.1.5 
    @mui/system:  6.1.5 
    @mui/types:  7.2.18 
    @mui/utils:  6.1.5 
    @types/react: ^18.3.11 => 18.3.12 
    react: ^18.3.1 => 18.3.1 
    react-dom: ^18.3.1 => 18.3.1 
    styled-components: latest => 6.1.13 
    typescript: ~5.6.2 => 5.6.3 
```
</details>

<details>
  <summary><code>tsc --showConfig</code></summary>

```
{
    "compilerOptions": {
        "paths": {
            "@mui/styled-engine": [
                "./node_modules/@mui/styled-engine-sc"
            ]
        },
        "target": "es5",
        "module": "esnext",
        "jsx": "react-jsx",
        "noEmit": true,
        "strict": true,
        "esModuleInterop": true,
        "forceConsistentCasingInFileNames": true,
        "lib": [
            "dom",
            "dom.iterable",
            "esnext"
        ],
        "allowSyntheticDefaultImports": true,
        "noFallthroughCasesInSwitch": true,
        "moduleResolution": "node10",
        "resolveJsonModule": true,
        "isolatedModules": true,
        "skipLibCheck": false,
        "preserveConstEnums": true,
        "noImplicitAny": true,
        "noImplicitThis": true,
        "strictNullChecks": true,
        "strictFunctionTypes": true,
        "strictBindCallApply": true,
        "strictPropertyInitialization": true,
        "strictBuiltinIteratorReturn": true,
        "alwaysStrict": true,
        "useUnknownInCatchVariables": true
    },
    "files": [
        "./src/App.tsx",
        "./src/main.tsx",
        "./src/vite-env.d.ts"
    ],
    "include": [
        "src/**/*"
    ]
}
```

</details>

**Search keywords**: styled-engine-sc styled-components TypeScript