### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

when describing using cloudformation YAML with Definition, LocalStack fails to create StateMachine. Switching to YAML with DefinitionString works as expected. 

Examples taken from here
https://docs.aws.amazon.com/step-functions/latest/dg/development-options.html#development-options-format

Attaching working example 
[localstack_stepfunctions_and_serverless.zip](https://github.com/localstack/localstack/files/7791134/localstack_stepfunctions_and_serverless.z




### Expected Behavior

YAML with Definition is much more preferable in a complex state machine description with bunch of substitutions, references and parameters

### How are you starting LocalStack?

With the `localstack` script

### Steps To Reproduce

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

    localstack --debug start -d

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

   awslocal s3 mb s3://s4-echo-serverless-deployment-share-local
sls deploy --stage local


### Environment

```markdown
- OS: OSX Monterey
- LocalStack: latest
```


### Anything else?

Error when using YAML with Definition
[error.txt](https://github.com/localstack/localstack/files/7791149/error.txt)

Success when using YAML with DefinitionString
[success.txt](https://github.com/localstack/localstack/files/7791151/success.txt)


import json
import pytest
from localstack.aws.api.lambda_ import Runtime
from localstack.testing.pytest import markers
from localstack.testing.snapshots.transformer import RegexTransformer
from localstack.utils.strings import short_uid
from tests.aws.services.stepfunctions.lambda_functions import lambda_functions
from tests.aws.services.stepfunctions.templates.base.base_templates import BaseTemplate
from tests.aws.services.stepfunctions.utils import (
    await_execution_aborted,
    await_execution_started,
    await_execution_success,
    await_state_machine_listed,
    await_state_machine_not_listed,
)
@markers.snapshot.skip_snapshot_verify(paths=["$..loggingConfiguration", "$..tracingConfiguration"])
class TestSnfApi:
    @markers.aws.validated
    def test_create_delete_valid_sm(
        self,
        create_iam_role_for_sfn,
        create_lambda_function,
        create_state_machine,
        sfn_snapshot,
        aws_client,
    ):
        create_lambda_1 = create_lambda_function(
            handler_file=lambda_functions.BASE_ID_FUNCTION,