### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

No matter what I do I cannot seem to connect to LocalStack v2.x inside of a GitLab container.

Locally, this works `http://s3.localhost.localstack.cloud:4566` using the same container without having to set path style.

In GitLab,

This works using v1.4 (for whatever reason this only worked when I set the path style)

```yaml
  services:
    - name: localstack/localstack:1.4
      alias: localstack
  variables:
    AWS_ACCESS_KEY_ID: test
    AWS_DEFAULT_REGION: us-east-1
    AWS_SECRET_ACCESS_KEY: test
    DEBUG: 1
    FORCE_NONINTERACTIVE: "true"
    LOCALSTACK_HOST: localstack
    SERVICES: s3
    S3_ENDPOINT_OVERRIDE: http://localstack:4566
    S3_PATH_STYLE_ACCESS: "true"
```

Now, it either cannot context or gives a "length" issue when trying to create a bucket.

```yaml
  services:
    - name: localstack/localstack #:1.4
      alias: localstack
  variables:
    AWS_ACCESS_KEY_ID: test
    AWS_DEFAULT_REGION: us-east-1
    AWS_SECRET_ACCESS_KEY: test
    DEBUG: 1
    FORCE_NONINTERACTIVE: "true"
    LOCALSTACK_HOST: localstack
    SERVICES: s3
    SKIP_E2E_TESTS: "false"
    S3_ENDPOINT_OVERRIDE: http://s3.localstack.localstack.cloud:4566
    S3_PATH_STYLE_ACCESS: "false"
```


### Expected Behavior

Access to S3 using v2 works the same, or with minor changes, since it worked with v1.4.

### How are you starting LocalStack?

Custom (please describe below)

### Steps To Reproduce

Running localstack as a GitLab service inside of a runner that does not have increased docker privileges.

### Environment

```markdown
- LocalStack: v2.0
```


### Anything else?

I've tried everything I can think of, assumingit is the URL endpoint (we had to make that change locally earlier), but no luck.
code, headers, body = fn(*args, **kwargs)
        storage_class = headers.get("x-amz-storage-class")
        if storage_class == "DEEP_ARCHIVE" and not headers.get("x-amz-restore"):
            raise InvalidObjectState(storage_class=storage_class)
        return code, headers, body
    @patch(moto_s3_responses.S3Response._key_response_post)
    def _fix_key_response_post(fn, self, request, body, bucket_name, *args, **kwargs):
        code, headers, body = fn(self, request, body, bucket_name, *args, **kwargs)
        bucket = self.backend.get_bucket(bucket_name)
        if not bucket.is_versioned:
            headers.pop("x-amz-version-id", None)
        return code, headers, body
    @patch(moto_s3_responses.S3Response.all_buckets)
    def _fix_owner_id_list_bucket(fn, *args, **kwargs) -> str:
        """
        Moto does not use the same CanonicalUser ID for the owner between ListBuckets and all ACLs related response
        Patch ListBuckets to return the same ID as the ACL
        """
        res: str = fn(*args, **kwargs)
        res = res.replace(
            "<ID>bcaf1ffd86f41161ca5fb16fd081034f</ID>", f"<ID>{MOTO_CANONICAL_USER_ID}</ID>"
        )
        return res
    @patch(moto_s3_responses.S3Response._tagging_from_xml)
    def _fix_tagging_from_xml(fn, *args, **kwargs) -> Dict[str, str]: