### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

I have a number of lambda functions behind an API Gateway, each responsible for serving a small API. My stack is defined in CDK and deployed to localstack using cdklocal.

For each of the services mounted on the gateway, I have 2 integration defined. One for the root of the resource and another proxing any none-root requests into the same lambda. 

My resources look like this:


```sh
> awslocal apigateway get-rest-apis
{
    "items": [
        {
            "id": "lgvd3zqa8b",
            "name": "TracktileBackendApiLocal",
            "description": "",
            "createdDate": "2021-12-14T18:16:08-04:00",
            "version": "V1",
            "binaryMediaTypes": [],
            "apiKeySource": "HEADER",
            "endpointConfiguration": {
                "types": [
                    "EDGE"
                ]
            },
            "tags": {},
            "disableExecuteApiEndpoint": false
        }
    ]
}
> awslocal apigateway get-resources --rest-api-id lgvd3zqa8b
{
    "items": [
        {
            "id": "f2zdoj6dmi",
            "path": "/",
            "resourceMethods": {
                "ANY": {
                    "httpMethod": "ANY",
                    "authorizationType": "NONE",
                    "apiKeyRequired": false,
                    "methodIntegration": {
                        "type": "AWS_PROXY",
                        "httpMethod": "POST",
                        "uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:000000000000:function:TracktileBackendLocal-CoreapiHandler25B88C23-ca16ca78/invocations",
                        "requestParameters": {},
                        "passthroughBehavior": "WHEN_NO_MATCH",
                        "cacheNamespace": "fecc94d8",
                        "cacheKeyParameters": []
                    }
                }
            }
        },
        {
            "id": "wetl5415x6",
            "parentId": "f2zdoj6dmi",
            "pathPart": "{proxy+}",
            "path": "/{proxy+}",
            "resourceMethods": {
                "ANY": {
                    "httpMethod": "ANY",
                    "authorizationType": "NONE",
                    "apiKeyRequired": false,
                    "methodIntegration": {
                        "type": "AWS_PROXY",
                        "httpMethod": "POST",
                        "uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:000000000000:function:TracktileBackendLocal-CoreapiHandler25B88C23-ca16ca78/invocations",
                        "requestParameters": {},
                        "passthroughBehavior": "WHEN_NO_MATCH",
                        "cacheNamespace": "0da7cd80",
                        "cacheKeyParameters": []
                    }
                }
            }
        },
        {
            "id": "ivgn3c0vcz",
            "parentId": "f2zdoj6dmi",
            "pathPart": "flow",
            "path": "/flow",
            "resourceMethods": {
                "ANY": {
                    "httpMethod": "ANY",
                    "authorizationType": "NONE",
                    "apiKeyRequired": false,
                    "methodIntegration": {
                        "type": "AWS_PROXY",
                        "httpMethod": "POST",
                        "uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:000000000000:function:TracktileBackendLocal-FlowapiHandler8606373F-4237e93b/invocations",
                        "requestParameters": {},
                        "passthroughBehavior": "WHEN_NO_MATCH",
                        "cacheNamespace": "a746819b",
                        "cacheKeyParameters": []
                    }
                }
            }
        },
        {
            "id": "plotkhzk1u",
            "parentId": "ivgn3c0vcz",
            "pathPart": "{proxy+}",
            "path": "/flow/{proxy+}",
            "resourceMethods": {
                "ANY": {
                    "httpMethod": "ANY",
                    "authorizationType": "NONE",
                    "apiKeyRequired": false,
                    "methodIntegration": {
                        "type": "AWS_PROXY",
                        "httpMethod": "POST",
                        "uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:000000000000:function:TracktileBackendLocal-FlowapiHandler8606373F-4237e93b/invocations",
                        "requestParameters": {},
                        "passthroughBehavior": "WHEN_NO_MATCH",
                        "cacheNamespace": "d53a7f58",
                        "cacheKeyParameters": []
                    }
                }
            }
        },
        {
            "id": "scpfu9z3l4",
            "parentId": "f2zdoj6dmi",
            "pathPart": "formulas",
            "path": "/formulas",
            "resourceMethods": {
                "ANY": {
                    "httpMethod": "ANY",
                    "authorizationType": "NONE",
                    "apiKeyRequired": false,
                    "methodIntegration": {
                        "type": "AWS_PROXY",
                        "httpMethod": "POST",
                        "uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:000000000000:function:TracktileBackendLocal-FormulaapiHandler4EC50B4-1db1cda1/invocations",
                        "requestParameters": {},
                        "passthroughBehavior": "WHEN_NO_MATCH",
                        "cacheNamespace": "2edb46e1",
                        "cacheKeyParameters": []
                    }
                }
            }
        },
        {
            "id": "ehhukzlulm",
            "parentId": "scpfu9z3l4",
            "pathPart": "{proxy+}",
            "path": "/formulas/{proxy+}",
            "resourceMethods": {
                "ANY": {
                    "httpMethod": "ANY",
                    "authorizationType": "NONE",
                    "apiKeyRequired": false,
                    "methodIntegration": {
                        "type": "AWS_PROXY",
                        "httpMethod": "POST",
                        "uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:000000000000:function:TracktileBackendLocal-FormulaapiHandler4EC50B4-1db1cda1/invocations",
                        "requestParameters": {},
                        "passthroughBehavior": "WHEN_NO_MATCH",
                        "cacheNamespace": "8385d874",
                        "cacheKeyParameters": []
                    }
                }
            }
        },
        {
            "id": "g0d4khz6zr",
            "parentId": "f2zdoj6dmi",
            "pathPart": "orders",
            "path": "/orders",
            "resourceMethods": {
                "ANY": {
                    "httpMethod": "ANY",
                    "authorizationType": "NONE",
                    "apiKeyRequired": false,
                    "methodIntegration": {
                        "type": "AWS_PROXY",
                        "httpMethod": "POST",
                        "uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:000000000000:function:TracktileBackendLocal-PurchaseOrderapiHandler4-1b5fc38d/invocations",
                        "requestParameters": {},
                        "passthroughBehavior": "WHEN_NO_MATCH",
                        "cacheNamespace": "aa1bb342",
                        "cacheKeyParameters": []
                    }
                }
            }
        },
        {
            "id": "p3n7jxk9p4",
            "parentId": "g0d4khz6zr",
            "pathPart": "{proxy+}",
            "path": "/orders/{proxy+}",
            "resourceMethods": {
                "ANY": {
                    "httpMethod": "ANY",
                    "authorizationType": "NONE",
                    "apiKeyRequired": false,
                    "methodIntegration": {
                        "type": "AWS_PROXY",
                        "httpMethod": "POST",
                        "uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:000000000000:function:TracktileBackendLocal-PurchaseOrderapiHandler4-1b5fc38d/invocations",
                        "requestParameters": {},
                        "passthroughBehavior": "WHEN_NO_MATCH",
                        "cacheNamespace": "fa8379bd",
                        "cacheKeyParameters": []
                    }
                }
            }
        },
        {
            "id": "1o403r2xzn",
            "parentId": "f2zdoj6dmi",
            "pathPart": "dashboards",
            "path": "/dashboards",
            "resourceMethods": {
                "ANY": {
                    "httpMethod": "ANY",
                    "authorizationType": "NONE",
                    "apiKeyRequired": false,
                    "methodIntegration": {
                        "type": "AWS_PROXY",
                        "httpMethod": "POST",
                        "uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:000000000000:function:TracktileBackendLocal-DashboardapiHandler67868-fea7c248/invocations",
                        "requestParameters": {},
                        "passthroughBehavior": "WHEN_NO_MATCH",
                        "cacheNamespace": "32beba39",
                        "cacheKeyParameters": []
                    }
                }
            }
        },
        {
            "id": "p4gz9qbom2",
            "parentId": "1o403r2xzn",
            "pathPart": "{proxy+}",
            "path": "/dashboards/{proxy+}",
            "resourceMethods": {
                "ANY": {
                    "httpMethod": "ANY",
                    "authorizationType": "NONE",
                    "apiKeyRequired": false,
                    "methodIntegration": {
                        "type": "AWS_PROXY",
                        "httpMethod": "POST",
                        "uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:000000000000:function:TracktileBackendLocal-DashboardapiHandler67868-fea7c248/invocations",
                        "requestParameters": {},
                        "passthroughBehavior": "WHEN_NO_MATCH",
                        "cacheNamespace": "2b449313",
                        "cacheKeyParameters": []
                    }
                }
            }
        }
    ]
}
```

The following requests succeed against my gateway:
- `GET /`
- `GET /dashboards`
- `GET /flow`
- `GET /flow/{name}`

However, this path fails
- `GET /flow/{name}/positions`

With this error returned from the gateway:
```
{"Type": "User", "message": "Unable to find path /prod/flow/default/positions", "__type": "NotFoundException"}
```

For some reason this path fails. There is a path parameter in the middle of the path, but API Gateway is not aware of it, the entire path should be parsed and handled by my express application inside of the lambda.

As far as I can tell, localstack appears to throw this error when this function is unable to resolve the path to a resource: https://github.com/localstack/localstack/blob/7c4c7e611e412b36d62528fda61aa2f764ac94da/localstack/services/apigateway/apigateway_listener.py#L896

However, I don't know enough about API Gateway to try my hand at a PR.

### Expected Behavior

I expect the request to match the proxy resource and be handled by the correct lambda.

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

- Deploy API Gateway resources matching above


### Environment

```markdown
Using `localstack/localstack:latest` as of the time of this issue.

# Environment
DATA_DIR=/tmp/localstack/data
EXTRA_CORS_ALLOWED_ORIGINS=http://localhost:3001
LAMBDA_EXECUTOR=docker-reuse
LAMBDA_REMOTE_DOCKER=false
LAMBDA_STAY_OPEN_MODE=1
LAMBDA_DOCKER_NETWORK=myapp_local
DYNAMODB_SHARE_DB=1
LS_LOG=trace
```


### Anything else?

_No response_
import json
import logging
import re
from typing import Any, Dict, List, Tuple
from botocore.utils import InvalidArnException
from jsonpatch import apply_patch
from jsonpointer import JsonPointerException
from moto.apigateway import models as apigateway_models
from moto.apigateway.utils import create_id as create_resource_id
from requests.models import Response
from six.moves.urllib import parse as urlparse
from localstack import config
from localstack.constants import APPLICATION_JSON, PATH_USER_REQUEST, TEST_AWS_ACCOUNT_ID
from localstack.services.generic_proxy import RegionBackend
from localstack.utils import common
from localstack.utils.aws import aws_stack
from localstack.utils.aws.aws_responses import requests_error_response_json, requests_response
from localstack.utils.aws.aws_stack import parse_arn
LOG = logging.getLogger(__name__)
PATH_REGEX_MAIN = r"^/restapis/([A-Za-z0-9_\-]+)/[a-z]+(\?.*)?"
PATH_REGEX_SUB = r"^/restapis/([A-Za-z0-9_\-]+)/[a-z]+/([A-Za-z0-9_\-]+)/.*"
PATH_REGEX_SUB = r"^/restapis/([A-Za-z0-9_\-]+)/[a-z]+/([A-Za-z0-9_\-]+)/.*"
PATH_REGEX_AUTHORIZERS = r"^/restapis/([A-Za-z0-9_\-]+)/authorizers/?([^?/]+)?(\?.*)?"
PATH_REGEX_VALIDATORS = r"^/restapis/([A-Za-z0-9_\-]+)/requestvalidators/?([^?/]+)?(\?.*)?"