### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

1. Create a bucket with object locking enabled.
2. Enable versioning in this bucket.
3. Upload file with **key**.  Received **version1** for this file.
4. Put a legal hold lock on the file (  **key** - **version1**).
5. Upload another file with the same **key**.  Received **version2** for this file.
6.  Put a legal hold lock on the file (  **key** - **version2**).
7. Remove the legal hold lock from the first version of the file  (  **key** - **version1**).
8. Try to delete the first version of the file (  **key** - **version1**) -> get An error occurred (AccessDenied) when calling the DeleteObject operation: Access Denied.


The script would run successfully if we change the order of commands (basically remove versions  of the file in reverse order):
(We have one file with version1 and version2, both locked)

- First, remove the lock from the version2.
- Delete version2.
- Remove the lock from version1.
- Delete version1.

### Expected Behavior

After the legal hold lock removed (Status=OFF) from the first uploaded version of the file, files should be accessible for deletion by its key and version.

### How are you starting LocalStack?

With the `localstack` script

### Steps To Reproduce

```
#!/bin/bash

echo -e "\033[0;32mCreate two text files\033[0m"

echo "Some text version 01..." > example-v1.txt
echo "Some text version 02..." > example-v2.txt

echo -e "\033[0;32mCreate bucket\033[0m"
awslocal s3api create-bucket --bucket my-bucket-001 --create-bucket-configuration LocationConstraint=ap-southeast-2 --region ap-southeast-2 --object-lock-enabled-for-bucket

echo -e "\033[0;32mEnable versioning\033[0m"
awslocal s3api put-bucket-versioning --bucket my-bucket-001 --versioning-configuration Status=Enabled

echo -e "\033[0;32mUpload first version of the file\033[0m"
version1=$(awslocal s3api put-object --bucket my-bucket-001 --key 123456789 --body example-v1.txt | jq -r '.VersionId')

echo -e "\033[0;32mPut lock on the version1 of the file\033[0m"
awslocal s3api put-object-legal-hold --bucket my-bucket-001 --key 123456789 --version-id $version1 --legal-hold Status=ON

echo -e "\033[0;32mUpload second version of the file\033[0m"
version2=$(awslocal s3api put-object --bucket my-bucket-001 --key 123456789 --body example-v2.txt | jq -r '.VersionId')

echo -e "\033[0;32mPut lock on the version2 of the file\033[0m"
awslocal s3api put-object-legal-hold --bucket my-bucket-001 --key 123456789 --version-id version2 --legal-hold Status=ON

echo -e "\033[0;32mRemove lock from the version1 of the file\033[0m"
awslocal s3api put-object-legal-hold --bucket my-bucket-001 --key 123456789 --version-id version1 --legal-hold Status=OFF

echo -e "\033[0;32mDelete version1 of the file\033[0m"
awslocal s3api delete-object --bucket my-bucket-001 --key 123456789 --version-id $version1
```

### Environment

```markdown
- OS: macOS 13.3.1
- LocalStack: latest, 2.0.2, 2.0.3.dev
```


### Anything else?

_No response_
endpoint_url=_endpoint_url(),
        )
        url = presigned_client.generate_presigned_url(
            "get_", Params={"Bucket": s3_bucket, "Key": _key}, ExpiresIn=5
        )
        parsed = urlparse(url)
        query_params = parse_qs(parsed.query)
        # sig v2
        if "Signature" in query_params:
            query_params.pop("Expires", None)
        else:  # sig v4
            query_params.pop("X-Amz-Date", None)
        new_query_params = urlencode(
            {k: v[0] for k, v in query_params.items()}, quote_via=quote, safe=" "
        )
        invalid_url = urlunsplit(
            SplitResult(  # noqa
                parsed.scheme, parsed.netloc, parsed.path, new_query_params, parsed.fragment
            )
        )
        resp = .get(invalid_url, verify=False)
        assert resp.status_code in [
            400,
            403,
        ]  # the 
        exception = xmltodict.parse(resp.content)
        exception["StatusCode"] = resp.status_code
        snapshot.match("missing-param-exception", exception)
    @pytest.mark.aws_validated
    def test_s3_get_response_content_type_same_as_upload_and_range(self, s3_bucket, aws_client):