I have created an automation to create Tasks and Subtasks using Branch and it works fine.

But, when I change the issue type, Tasks to Story and Subtasks to Task, then it stops working and I get this error in the Audit Log, "Given parent issue does not belong to appropriate hierarchy. (parentId)"

I am keeping all setting as is and just changing the issue type.
What am I missing?