### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

VTL template for request is not properly processed. 

Testing with sample project provided at https://github.com/localstack/localstack-terraform-samples/tree/master/apigateway-lambda-velocity several parameters of the request, such as path and identity are not properly parsed. 

For a request like this:

```
curl -X POST "0naclskncu.execute-api.localhost.localstack.cloud:4566/local/test" -H 'content-type: application/json' -d '{ "greeter": "cesar" }'
```

the result is:
```
{
"body": {"greeter": "cesar"},
"method": "POST",
"principalId": "",
"stage": "local",

"cognitoPoolClaims" : {

"sub": ""
},

"enhancedAuthContext":     {
}
,

"headers":     {
}
,

"query":     {
}
,

"path":     {

""proxy"":
""test""
}
,

"identity":     {

""accountId"":
"0"
,
""sourceIp"":
""172.17.0.1""
,
""userAgent"":
""curl/7.84.0""
}
,

"stageVariables":     {
}
,

"requestPath": "/{proxy+}"
}
```
Notice the extra double quotes on path and identity values which results in a non valid JSON document.

From the localstack logs:

```
botocore.errorfactory.UnsupportedMediaTypeException: An error occurred (UnsupportedMediaTypeException) when calling the Invoke operation: The payload is not JSON:


{
"body": {"greeter": "cesar"},
"method": "POST",
"principalId": "",
"stage": "local",

"cognitoPoolClaims" : {

"sub": ""
},

"enhancedAuthContext":     {
}
,

"headers":     {
}
,

"query":     {
}
,

"path":     {

""proxy"":
""test""
}
,

"identity":     {

""accountId"":
"0"
,
""sourceIp"":
""172.17.0.1""
,
""userAgent"":
""curl/7.84.0""
}
,

"stageVariables":     {
}
,

"requestPath": "/{proxy+}"
}

2022-11-16T09:47:17.833  INFO --- [   asgi_gw_0] localstack.request.http    : POST /local/test => 400; Request(b'{ "greeter": "cesar" }', headers={'Host': '0naclskncu.execute-api.localhost.localstack.cloud:4566', 'User-Agent': 'curl/7.84.0', 'Accept': '*/*', 'content-type': 'application/json', 'Content-Length': '22', 'x-localstack-tgt-api': 'apigateway'}); Response(b'{"Type": "User", "message": "Error invoking integration for API Gateway ID \'0naclskncu\': An error occurred (UnsupportedMediaTypeException) when calling the Invoke operation: The payload is not JSON:  \\n\\n  \\n  {\\n    \\"body\\": {\\"greeter\\": \\"cesar\\"},\\n    \\"method\\": \\"POST\\",\\n    \\"principalId\\": \\"\\",\\n    \\"stage\\": \\"local\\",\\n\\n    \\"cognitoPoolClaims\\" : {\\n\\n       \\"sub\\": \\"\\"\\n    },\\n\\n        \\"enhancedAuthContext\\":     {\\n        }\\n  ,\\n\\n        \\"headers\\":     {\\n        }\\n  ,\\n\\n        \\"query\\":     {\\n        }\\n  ,\\n\\n        \\"path\\":     {\\n    \\n                        \\"\\"proxy\\"\\":\\n          \\"\\"test\\"\\"\\n                  }\\n  ,\\n\\n        \\"identity\\":     {\\n    \\n                        \\"\\"accountId\\"\\":\\n          \\"0\\"\\n           ,     \\n                        \\"\\"sourceIp\\"\\":\\n          \\"\\"172.17.0.1\\"\\"\\n           ,     \\n                        \\"\\"userAgent\\"\\":\\n          \\"\\"curl/7.84.0\\"\\"\\n                  }\\n  ,\\n\\n        \\"stageVariables\\":     {\\n        }\\n  ,\\n\\n    \\"requestPath\\": \\"/{proxy+}\\"\\n  }\\n", "__type": "InvalidRequest"}', headers={'Content-Type': 'text/html; charset=utf-8', 'x-amzn-errortype': 'InvalidRequest', 'Content-Length': '1108', 'Connection': 'close'})
```

### Expected Behavior

The template should render a proper JSON document

### How are you starting LocalStack?

Custom (please describe below)

### Steps To Reproduce

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

    LS_LOG=trace-internal localstack start

#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

    - localstack-terraform-samples/apigateway-lambda-velocity $ terraform init; terraform plan; terraform apply --auto-approve
   - localstack-terraform-samples/apigateway-lambda-velocity $ curl -X POST "9b2k2o2wd1.execute-api.localhost.localstack.cloud:4566/local/test" -H 'content-type: application/json' -d '{ "greeter": "cesar" }'

*** APIGW ID is taked from the terraform apply output


### Environment

```markdown
- OS: Macos 13.0.1
- LocalStack: 1.2.1.dev 
- Docker Desktop: v4.13.1
```


### Anything else?

Searching for velocity bug, I encountered bug https://github.com/localstack/localstack/issues/5587 which is resolved but actually the bug is still there.
import base64
import json
import logging
from enum import Enum
from typing import Any, Dict, Union
from urllib.parse import quote_plus, unquote_plus
from localstack import config
from localstack.constants import APPLICATION_JSON
from localstack.services.apigateway.context import ApiInvocationContext
from localstack.utils.aws.templating import VelocityUtil, VtlTemplate
from localstack.utils.json import extract_jsonpath, json_safe
from localstack.utils.numbers import is_number, to_number
from localstack.utils.strings import to_str
LOG = logging.getLogger(__name__)
class PassthroughBehavior(Enum):
    WHEN_NO_MATCH = "WHEN_NO_MATCH"
    WHEN_NO_TEMPLATES = "WHEN_NO_TEMPLATES"
    NEVER = "NEVER"
class MappingTemplates:
    """
    API Gateway uses mapping templates to transform incoming requests before they are sent to the
    integration back end. With API Gateway, you can define one mapping template for each possible
    content type. The content type selection is based on the Content-Type header of the incoming
    request. If no content type is specified in the request, API Gateway uses an application/json
    mapping template. By default, mapping templates are configured to simply pass through the
    request input. Mapping templates use Apache Velocity to generate a request to your back end.
    """
    passthrough_behavior: PassthroughBehavior
    class UnsupportedMediaType(Exception):