Deployment of Admin Separately Doesn't Work
### Node Version

20.17.0

### NPM/Yarn/PNPM Version

NPM 10.8.2

### Strapi Version

5.7.0

### Operating System

Other

### Database

PostgreSQL

### Javascript or Typescript

Typescript

### Reproduction URL

_No response_

### Bug Description

Following up on this [issue](https://github.com/strapi/strapi/issues/19330), and this [comment](https://github.com/strapi/strapi/pull/21914#discussion_r1883687885) by @ashisherc.  Deployment on separate servers doesn't work when admin path is `/`.



### Steps to Reproduce

Deploy have separate API/Admin deployment with admin path as `/`.

### Expected Behavior

You should be able to specify any admin path.

### Logs

```shell

```

### Code Snippets

_No response_

### Media

_No response_

### Additional information

_No response_

### 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).