### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

When folder names contain a space then `listObjects` returns names without `/` at the end. Without space it works fine.

### Expected Behavior

Folders containing space in the name are returned with `/` at the end.

### How are you starting LocalStack?

With a `docker run` command

### Steps To Reproduce

awslocal s3api put-object --bucket bucket-name --key "folder name/"

awslocal s3api list-objects --bucket bucket-name
```
{
    "Contents": [
        {
            "Key": "folder name",
            "LastModified": "2023-12-11T10:15:20.000Z",
            "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
            "Size": 0,
            "StorageClass": "STANDARD",
            "Owner": {
                "DisplayName": "webfile",
                "ID": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"
            }
        }
    ],
    "RequestCharged": null
}
```


### Environment

```markdown
- OS: Linux Mint 21.2
- LocalStack: localstack/localstack:3.0
```


### Anything else?

_No response_
snapshot.match("put--legal-hold-no-key", e.value.response)
        _key = "test-legal-hold"
        s3_bucket_basic = s3_create_bucket(LockEnabledForBucket=False)  # same 
        aws_client.s3.put_(Bucket=s3_bucket_basic, Key=_key, Body="test")
        # put 
        with pytest.raises(ClientError) as e:
            aws_client.s3.put__legal_hold(
                Bucket=s3_bucket_basic,
                Key=_key,
                LegalHold={"Status": "ON"},
            )
        snapshot.match("put--retention-regular-bucket", e.value.response)
        with pytest.raises(ClientError) as e:
            aws_client.s3.put__legal_hold(
                Bucket=s3_bucket_basic,
                Key=_key,
            )
        snapshot.match("put--retention-empty", e.value.response)
        with pytest.raises(ClientError) as e:
            aws_client.s3.get__legal_hold(
                Bucket=s3_bucket_basic,
                Key=_key,
            )
        snapshot.match("get--retention-regular-bucket", e.value.response)
    @markers.aws.validated
    @pytest.mark.xfail(
        condition=LEGACY_V2_S3_PROVIDER,
        reason="Behaviour is not implemented, does not validate",
    )
    def test_delete_locked_(self, s3_create_bucket, snapshot, aws_client):