### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Nested stacks with conditional Outputs fails with: 
```
"StackStatus": "CREATE_FAILED",
"StackStatusReason": "'OutputValue'",
```

Console log:
```
2023-11-14T11:53:24.404 DEBUG --- [thread295773] l.s.c.e.template_deployer  : Unable to resolve Ref for resource "TestS3" (yet) - {'Type': 'AWS::S3::Bucket', 'Condition': 'TestMode', 'Properties': {'BucketName': 's3-test-bucket'}, 'LogicalResourceId': 'TestS3', 'PhysicalResourceId': None}
2023-11-14T11:53:24.404 DEBUG --- [thread295773] l.s.c.e.template_deployer  : Unable to resolve references in stack outputs: {'Condition': 'TestMode', 'Value': {'Ref': 'TestS3'}} - Unable to resolve Ref for resource "TestS3" (yet)
2023-11-14T11:53:24.608  INFO --- [   asgi_gw_9] localstack.request.aws     : AWS cloudformation.DescribeStacks => 200; 000000000000/eu-west-1; DescribeStacksInput({'StackName': 'condition-test'}, headers={'Host': 'localhost:4566', 'Accept-Encoding': 'identity', 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': 'aws-cli/1.29.62 md/Botocore#1.31.62 ua/2.0 os/linux#5.15.90.1-microsoft-standard-WSL2 md/arch#x86_64 lang/python#3.10.12 md/pyimpl#CPython cfg/retry-mode#legacy botocore/1.31.62', 'X-Amz-Date': '20231114T115324Z', 'X-Amz-Security-Token': 'FwoGZXIvYXdzEKv//////////wEaDNxyPqG7iYeEB0V+1SLoAcaCExKA6NP0U7TU5fUynnqF8SN7qSDyjkX3AtvUupqSPG3B+T7fMiFpooKlWpueugBLATLtHF1CkRCYodkgo0gNNwAbpgSgt83im6bsbyhYdgCO/+2YPQxUbJJi+HMM4RY3i9B5PaJVdUxphgUq+n6YiByc5vMK3mWuJIbmST5qTRZuazbKzqf1xEb/7cE5IMz0XcoZViBqsgrP941ZW0Xj9q5Gat1ycHVWhlNCtAfD0DunKtlOeqRV1YFgwukEKKpO/sNHvf6pnzwmeqHBbRxE61A50+B2MHqiznmNizTa82+iN7jziTUoo9eyqgYyMpZJtjFbPTqRJAzs/Dsj50jKmBhfCgJ8IUntenMHeb2VqZCcpN2j+fCnGuFGzh35RxjM', 'Authorization': 'AWS4-HMAC-SHA256 Credential=ASIA43ROISYDHWYD2P5D/20231114/eu-west-1/cloudformation/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-security-token, Signature=b2924b2a4ce200afe6c8d940989695c51a89752a9aee79bb530fc552bca9ff94', 'amz-sdk-invocation-id': '2dba8d3c-a7b8-4982-8fee-d34ce0b0b26a', 'amz-sdk-request': 'attempt=1', 'Content-Length': '65', 'x-localstack-tgt-api': 'cloudformation', 'x-moto-account-id': '000000000000'}); DescribeStacksOutput({'Stacks': [{'StackName': 'condition-test', 'Capabilities': ['CAPABILITY_IAM', 'CAPABILITY_NAMED_IAM', 'CAPABILITY_AUTO_EXPAND'], 'StackId': 'arn:aws:cloudformation:eu-west-1:000000000000:stack/condition-test/722f842e', 'StackStatus': 'CREATE_IN_PROGRESS', 'CreationTime': '2023-11-14T11:53:24.221Z', 'LastUpdatedTime': '2023-11-14T11:53:24.221Z', 'Description': None, 'RollbackConfiguration': {}, 'DisableRollback': False, 'EnableTerminationProtection': False, 'Tags': [], 'DriftInformation': {'StackDriftStatus': 'NOT_CHECKED'}, 'NotificationARNs': []}]}, headers={'Content-Type': 'text/xml', 'Content-Length': '995', 'Connection': 'close', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'HEAD,GET,PUT,POST,DELETE,OPTIONS,PATCH', 'Access-Control-Allow-Headers': 'authorization,cache-control,content-length,content-md5,content-type,etag,location,x-amz-acl,x-amz-content-sha256,x-amz-date,x-amz-request-id,x-amz-security-token,x-amz-tagging,x-amz-target,x-amz-user-agent,x-amz-version-id,x-amzn-requestid,x-localstack-target,amz-sdk-invocation-id,amz-sdk-request', 'Access-Control-Expose-Headers': 'etag,x-amz-version-id'})
2023-11-14T11:53:24.638 DEBUG --- [  asgi_gw_36] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.

2023-11-14T11:53:25.334  INFO --- [  asgi_gw_22] l.request.internal.aws     : AWS cloudformation.DescribeStacks => 200
2023-11-14T11:53:25.337 DEBUG --- [thread295768] l.s.c.e.template_deployer  : Error applying changes for CloudFormation stack "condition-test": 'OutputValue' Traceback (most recent call last):
  File "/opt/code/localstack/.venv/lib/python3.11/site-packages/localstack/services/cloudformation/engine/template_deployer.py", line 1172, in _run
    self.do_apply_changes_in_loop(changes, stack)
  File "/opt/code/localstack/.venv/lib/python3.11/site-packages/localstack/services/cloudformation/engine/template_deployer.py", line 1246, in do_apply_changes_in_loop
    self.apply_change(change, stack=stack)
  File "/opt/code/localstack/.venv/lib/python3.11/site-packages/localstack/services/cloudformation/engine/template_deployer.py", line 1361, in apply_change
    progress_event = executor.deploy_loop(resource_provider_payload)  # noqa
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/code/localstack/.venv/lib/python3.11/site-packages/localstack/services/cloudformation/resource_provider.py", line 647, in deploy_loop
    event = self.execute_action(resource_provider, payload)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/code/localstack/.venv/lib/python3.11/site-packages/localstack/services/cloudformation/resource_provider.py", line 716, in execute_action
    return resource_provider.create(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/code/localstack/.venv/lib/python3.11/site-packages/localstack/services/cloudformation/resource_provider.py", line 401, in create
    return self.create_or_delete(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/code/localstack/.venv/lib/python3.11/site-packages/localstack/services/cloudformation/resource_provider.py", line 566, in create_or_delete
    result_handler(
  File "/opt/code/localstack/.venv/lib/python3.11/site-packages/localstack/services/cloudformation/models/cloudformation.py", line 81, in _handle_result
    resource["Properties"]["Outputs"] = {
                                        ^
  File "/opt/code/localstack/.venv/lib/python3.11/site-packages/localstack/services/cloudformation/models/cloudformation.py", line 82, in <dictcomp>
    o["OutputKey"]: o["OutputValue"] for o in outputs
                    ~^^^^^^^^^^^^^^^
KeyError: 'OutputValue'
```

Main template:
```
AWSTemplateFormatVersion: '2010-09-09'
Resources:
  Bucket:
    Type: AWS::CloudFormation::Stack
    Properties:
      TemplateURL: https://standard-common-modules.s3.localhost.localstack.cloud/conditions.yaml
      Parameters:
        Mode: prod
Outputs:
  ProdBucket:
    Value: !GetAtt Bucket.Outputs.ProdBucket
```

Nested stack template:
```
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
  Mode:
    Type: String
Conditions:
  ProdMode: !Equals [ !Ref Mode, prod ]
  TestMode: !Equals [ !Ref Mode, test ]
Resources:
  TestS3:
    Type: AWS::S3::Bucket
    Condition: TestMode
    Properties:
      BucketName: s3-test-bucket
  ProdS3:
    Type: AWS::S3::Bucket
    Condition: ProdMode
    Properties:
      BucketName: s3-prod-bucket
Outputs:
  TestBucket:
    Condition: TestMode
    Value: !Ref TestS3
  ProdBucket:
    Condition: ProdMode
    Value: !Ref ProdS3
```

### Expected Behavior

Stack deployed correctly with proper Outputs.

### How are you starting LocalStack?

With a `docker run` command

### Steps To Reproduce

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

```
docker run \
--rm \
--name localstack_main \
-p 4566:4566 \
-p 4510-4559:4510-4559 \
-e LOCALSTACK_API_KEY=$LOCALSTACK_API_KEY \
-e PERSISTENCE=0\
-e LS_LOG=trace \
-e SNAPSHOT_LOAD_STRATEGY=ON_STARTUP \
-v ./localstack-volume:/var/lib/localstack \
-v /var/run/docker.sock:/var/run/docker.sock \
    localstack/localstack-pro:2.3.2
```
#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

    awslocal cloudformation create-stack --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND --stack-name condition-test --template-body file://conditions-test.yaml && awslocal cloudformation wait stack-create-complete --stack-name condition-test


### Environment

```markdown
- OS: 5.15.90.1-microsoft-standard-WSL2
- LocalStack: 2.3.2:c1fe21b
```


### Anything else?

_No response_
val,
            )
    if isinstance(value, list):
        # 
        if len(value) == 1 and isinstance(value[0], list) and len(value[0]) == 2:
            inner_list = value[0]
            if str(inner_list[0]).lower().startswith("fn::"):
                return resolve_refs_recursively(
                    account_id,
                    region_name,
                    stack_name,
                    s,
                    mappings,
                    conditions,
                    s,
                    {inner_list[0]: inner_list[1]},
                )
        for i in range(len(value)):
            value[i] = resolve_refs_recursively(
                account_id,
                region_name,
                stack_name,
                s,
                mappings,
                conditions,
                s,
                value[i],
            )
    return value
def resolve_placeholders_in_string(