### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

When adding a custom id to an apigateway V1 via tags in aws-cdk the id will be applied and deploying returns the url including the custom id (https://<custom-id>.execute-api.localhost.localstack.cloud:4566/prod/). Querying this url however will return a 404 response. 

The url generated when no custom id is provided works with issue.

### Expected Behavior

The custom id is applied and querying works with the url including the custom id.

### How are you starting LocalStack?

With the `localstack` script

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

localstack start -d

#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)
*AWS CDK (python)*
```python
# test-stack.py
from aws_cdk import (
    Stack,
    aws_lambda,
    aws_apigateway as api_gateway,
    Tags,
)
from pathlib import Path
from constructs import Construct


class TestStack(Stack):
    def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
        super().__init__(scope, construct_id, **kwargs)

        my_lambda = aws_lambda.Function(
            self,
            "test-lambda",
            code=aws_lambda.Code.from_asset("lambdas"),
            runtime=aws_lambda.Runtime.PYTHON_3_9,
            handler="test_lambda.handle",
        )

        api = api_gateway.RestApi(
            self,
            "Api",
            rest_api_name="apiName",
        )
        Tags.of(api).add(
            "_custom_id_", "myCustomId"
        )  # makes api id and therefore url static

        api.root.add_method(
            "GET", api_gateway.LambdaIntegration(my_lambda)  # type: ignore
        )

```
```python
# lambdas/test_lambda.py
def handle(event, context):
    return {"statusCode": 200, "body": {}}
```

Deploy outputs: https://myCustomId.execute-api.localhost.localstack.cloud:4566/prod/
Querying this url returns 404

![localstack-bug-postman](https://user-images.githubusercontent.com/48515433/201137013-0e0f1161-7818-427a-88d8-a12e9c2b2199.JPG)

### Environment

```markdown
- OS: Windows 10
- LocalStack: latest (10.11.2022)
- aws-cdk@2.44.0
```


### Anything else?

I found [#4499](https://github.com/localstack/localstack/issues/4499), but from the deploy output and awslocal it seems that the Api Gateway should have been created with the custom id but cannot be queried.  

---
Result without custom id:

![localstack-bug-postman-expected](https://user-images.githubusercontent.com/48515433/201140708-84f49aa2-cd3f-49e1-8947-9b6572941630.JPG)

result = requests.post(url, data=binary_msg)
        result_content = json.loads(to_str(result.content))
        assert "/yCqIBE=" == result_content["body"]
        assert ["isBase64Encoded"]
    def test_api_gateway_lambda_proxy_integration_any_method(self):
        self._test_api_gateway_lambda_proxy_integration_any_method(
            self.TEST_LAMBDA_PROXY_BACKEND_ANY_METHOD,
            self.API_PATH_LAMBDA_PROXY_BACKEND_ANY_METHOD,
        )
    def test_api_gateway_lambda_proxy_integration_any_method_with_path_param(self):
        self._test_api_gateway_lambda_proxy_integration_any_method(
            self.TEST_LAMBDA_PROXY_BACKEND_ANY_METHOD_WITH_PATH_PARAM,
            self.API_PATH_LAMBDA_PROXY_BACKEND_ANY_METHOD_WITH_PATH_PARAM,
        )
    def test_api_gateway_lambda_asynchronous_invocation(self, apigateway_client, create_rest_apigw):
        api_gateway_name = f"api_gateway_{short_uid()}"
        rest_api_id, _, _ = create_rest_apigw(name=api_gateway_name)
        fn_name = f"test-{short_uid()}"
        testutil.create_lambda_function(
            handler_file=TEST_LAMBDA_NODEJS, func_name=fn_name, runtime=LAMBDA_RUNTIME_NODEJS12X
        )
        lambda_arn = aws_stack.lambda_function_arn(fn_name)
        spec_file = load_file(TEST_IMPORT_REST_API_ASYNC_LAMBDA)
        spec_file = spec_file.replace("${lambda_invocation_arn}", lambda_arn)
        apigateway_client.put_rest_api(restApiId=rest_api_id, body=spec_file, mode="overwrite")
        url = path_based_url(api_id=rest_api_id, stage_name="latest", path="/wait/3")
        result = requests.get(url)
        assert result.status_code == 200
        assert result.content == b""
    def test_api_gateway_mock_integration(self, apigateway_client, create_rest_apigw):