### 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)


state_machine_arns = list()
        for i, sm_name in enumerate(sm_names):
            creation_resp = create_state_machine(
                name=sm_name,
                definition=definition_str,
                roleArn=snf_role_arn,
            )
            sfn_snapshot.add_transformer(sfn_snapshot.transform.sfn_sm_create_arn(creation_resp, i))
            sfn_snapshot.match(f"creation_resp_{i}", creation_resp)
            state_machine_arn: str = creation_resp["stateMachineArn"]
            state_machine_arns.append(state_machine_arn)
            await_state_machine_listed(
                stepfunctions_client=aws_client.stepfunctions, state_machine_arn=state_machine_arn
            )
        lst_resp = aws_client.stepfunctions.list_state_machines()
        lst_resp_filter = [sm for sm in lst_resp["stateMachines"] if sm["name"] in sm_names]
        sfn_snapshot.match("lst_resp_filter", lst_resp_filter)
        for i, state_machine_arn in enumerate(state_machine_arns):
            deletion_resp = aws_client.stepfunctions.delete_state_machine(
                stateMachineArn=state_machine_arn
            )
            sfn_snapshot.match(f"deletion_resp_{i}", deletion_resp)
            await_state_machine_not_listed(
                stepfunctions_client=aws_client.stepfunctions, state_machine_arn=state_machine_arn
            )
        lst_resp = aws_client.stepfunctions.list_state_machines()
        lst_resp_filter = [sm for sm in lst_resp["stateMachines"] if sm["name"] in sm_names]
        sfn_snapshot.match("lst_resp_del_filter", lst_resp_filter)
    @markers.aws.needs_fixing
    def test_start_execution(