### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

In version 1.4.0 OpenSearch is returning invalid responses when specifying gzip encoding. This was working in 1.3.1. The proxied response is not gzip encoded even though the content-encoding response header says its gzip. Reproduction steps show the differences between the output directly from OpenSearch vs the proxied result.

### Expected Behavior

Returning properly encoded responses.

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

```
version: "3.9"

services:
  opensearch:
    container_name: opensearch
    image: opensearchproject/opensearch:2.3.0
    environment:
      - node.name=opensearch
      - cluster.name=opensearch-docker-cluster
      - discovery.type=single-node
      - bootstrap.memory_lock=true
      - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
      - "DISABLE_SECURITY_PLUGIN=true"
    ports:
      - "9200:9200"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - data01:/usr/share/opensearch/data

  localstack:
    container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}"
    image: localstack/localstack
    ports:
      - "4566:4566"
    depends_on:
      - opensearch
    environment:
      - OPENSEARCH_CUSTOM_BACKEND=http://opensearch:9200
      - DEBUG=${DEBUG- }
      - PERSISTENCE=${PERSISTENCE- }
      - DOCKER_HOST=unix:///var/run/docker.sock
    volumes:
      - "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
      - "/var/run/docker.sock:/var/run/docker.sock"

volumes:
  data01:
    driver: local
```

1. Run docker compose
```sh
docker-compose up -d
```

2. Create the OpenSearch domain:
```
awslocal opensearch create-domain --domain-name my-domain
```

3. Test - Notice content length and output
```
curl -v -X GET my-domain.us-east-1.opensearch.localhost.localstack.cloud:4566/  -H 'Accept-Encoding: gzip' --output -
curl -v -X GET localhost:9200/ -H 'Accept-Encoding: gzip' --output -
```


### Environment

```markdown
- OS:
- LocalStack: latest 1.4.0
```


### Anything else?

_No response_
import dataclasses
import logging
import os
import threading
from typing import Dict, List, NamedTuple, Optional, Tuple
from urllib.parse import urlparse
import requests
from werkzeug.routing import Rule
from localstack import config, constants
from localstack.aws.api.opensearch import (
    AdvancedSecurityOptionsInput,
    EngineType,
    ValidationException,
)
from localstack.http.client import SimpleRequestsClient
from localstack.http.proxy import ProxyHandler
from localstack.services.edge import ROUTER
from localstack.services.infra import DEFAULT_BACKEND_HOST
from localstack.services.opensearch import versions
from localstack.services.opensearch.packages import elasticsearch_package, opensearch_package
from localstack.utils.aws.arns import parse_arn
from localstack.utils.common import (
    ShellCommandThread,
    chmod_r,