`useRBAC` must be used within `Auth` since v5.11 (production only)
### Node Version

20.18.3

### NPM/Yarn/PNPM Version

10.8.2

### Strapi Version

5.11.2

### Operating System

MacOS

### Database

SQLite

### Javascript or Typescript

Typescript

### Reproduction URL

_No response_

### Bug Description

👋 

I have a custom plugin and I inject a component inside the Strapi editor sidebar. I added some permissions inside, so I use the hook `useRBAC`. It used to work (_it started to work during the beta v5_).

BUt via the 5.11 upgrade, it's broken but _only on production_. If you build your plugin and use `npm run develop` you don't get the issue.

I tried to use `Page.Protect` as it's something you use inside a few plugins. It doesn't change anything except the error message `Protect must be used within Auth`

I tried to inject the `AuthProvider` for my plugin but you don't expose it. I tried to fix the module admin to expose it, but then I was unable to build strapi :/ 

> I have the same issue for an injected component and a custom page for the plugin


tl;dr: I can't use permissions anymore as I can't make them work with the 5.11.

### Steps to Reproduce

1. Create a plugin
2. Copy the component inside a file
3. Inject this component via `injectComponent` inside `bootstrap`
4. Build the plugin
5. Build strapi
6. Run `npm run start -- start`


Ex injection code:
```js
    app.getPlugin('content-manager').injectComponent('editView', 'right-links', {
      name: 'seed-translations-document',
      Component: ButtonSeedTranslationsDocument,
    });
```

### Expected Behavior

Same as when we run develop, we can load the plugin and it works.
Same as when we used to have the 5.10.x, we can load the plugin and it works.

### Logs

```shell
- `Protect` must be used within `Auth` if I use `Page.Protect permissions={xxx}`
- `useRBAC` must be used within `Auth` if I use `useRBAC`
```

### Code Snippets

```js
import { Box, Button, Divider, Typography } from '@strapi/design-system';
import { Page, useAuth, useRBAC } from '@strapi/strapi/admin';
import { PERMISSIONS_VIEWS } from '../../../../permissions';


function Main() {
  console.log(PERMISSIONS_VIEWS.sendTranslations)
  return (
    <>
      <Box width={'100%'}>
        <Button onClick={() => alert("coucou")}  width={'100%'}>
          ha que
        </Button>
      </Box>
    </>
  );
}

function MainWithAuth() {
  const dew = useAuth('ButtonSeedTranslationsDocument', state => state.permissions)

  return (
    <>
      <Box width={'100%'}>
        <Button onClick={() => alert("coucou")}  width={'100%'}>
          ha que
        </Button>
      </Box>
    </>
  );
}

function MainWithRBAC() {
  const { isLoading, allowedActions } = useRBAC(PERMISSIONS_VIEWS.sendTranslations);

  return (
    <>
      <Box width={'100%'}>
        <Button onClick={() => alert("coucou")}  width={'100%'}>
          ha que
        </Button>
      </Box>
    </>
  );
}

export default function Render() {

  return <Main />
  // `ButtonSeedTranslationsDocument` must be used within `Auth`
  // return (<MainWithAuth/>);
  
  // `useRBAC` must be used within `Auth`
  // return (<MainWithRBAC/>);


  // `Protect` must be used within `Auth`
  // return (
  //     <Page.Protect permissions={PERMISSIONS_VIEWS.sendTranslations}>
  //       <Main/>
  //     </Page.Protect>
  // );
  
  //`Protect` must be used within `Auth`
  // return (
  //     <Page.Protect permissions={PERMISSIONS_VIEWS.sendTranslations}>
  //       <MainWithAuth/>
  //     </Page.Protect>
  // );
  
  // `Protect` must be used within `Auth`
  // return (
  //     <Page.Protect permissions={PERMISSIONS_VIEWS.sendTranslations}>
  //       <MainWithRBAC/>
  //     </Page.Protect>
  // );
}

```

> I added the variants I tried. 

### Permissions


```JSON
[
    {
        "action": "plugin::proton-crowdin.settings-read",
        "subject": null
    },
    {
        "action": "plugin::proton-crowdin.translations-update-pme",
        "subject": null
    },
    {
        "action": "plugin::proton-crowdin.translations-update-vpn",
        "subject": null
    }
]
```

### Media

<img width="954" alt="Image" src="https://github.com/user-attachments/assets/1206dfe8-d7ad-49d5-8fab-c1be8d21f889" />

### Additional information

I found a few bug reports ex https://github.com/strapi/strapi/issues/22382 All our plugins are for strapi v5 and with the latest strapi version as a dep. 

```
-----strapi root
    "@strapi/email": "5.11.2",
    "@strapi/plugin-cloud": "5.11.2",
    "@strapi/plugin-documentation": "5.11.2",
    "@strapi/plugin-users-permissions": "5.11.2",
    "@strapi/sdk-plugin": "5.3.2",
    "@strapi/strapi": "5.11.2",

-----proton-admin
    "@strapi/design-system": "^2.0.0-rc.18",
    "@strapi/icons": "^2.0.0-rc.18",
    "@strapi/sdk-plugin": "5.3.2",
    "@strapi/strapi": "5.11.2",
    "@strapi/typescript-utils": "5.11.2",
-----proton-crowdin
    "@strapi/design-system": "^2.0.0-rc.18",
    "@strapi/icons": "^2.0.0-rc.18",
    "@strapi/sdk-plugin": "5.3.2",
    "@strapi/strapi": "5.11.2",
    "@strapi/typescript-utils": "5.11.2",
-----proton-fields
    "@strapi/design-system": "^2.0.0-rc.18",
    "@strapi/icons": "^2.0.0-rc.18",
    "@strapi/sdk-plugin": "5.3.2",
    "@strapi/strapi": "5.11.2",
    "@strapi/typescript-utils": "5.11.2",

```
we have another plugin strapi-v5-plugin-populate-deep@4.0.5 (a v5 plugin). I tried to disable them but still the same issue.


```sh
 Project information

┌────────────────────┬──────────────────────────────────────────────────┐
│ Time               │ Thu Mar 20 2025 17:50:00 GMT+0100 (Central Euro… │
│ Launched in        │ 826 ms                                           │
│ Environment        │ development                                      │
│ Process PID        │ 26269                                            │
│ Version            │ 5.11.2 (node v20.18.3)                           │
│ Edition            │ Community                                        │
│ Database           │ sqlite                                           │
│ Database name      │ .tmp/data.db                                     │
└────────────────────┴──────────────────────────────────────────────────┘
```

> Edit NODE_ENV=production doesn't change anything.

command: `npm run start -- start` because it's impossible to replicate using `npm run develop` even with NODE_ENV=production. I tried to use the strictMode from React but it doesn't change anything using the dev server :/


We found the bug via Strapi Cloud. We can replicate _if_ we use build then use `npm run start -- start`.



### Confirmation Checklist

- [x] I have checked the existing [issues](https://github.com/strapi/strapi/issues) for duplicates.
- [x] I agree to follow this project's [Code of Conduct](https://github.com/strapi/strapi/blob/develop/CODE_OF_CONDUCT.md).