Trigger "When all subtasks are marked as completed" for tasks without subtasks

I have a workflow with a rule that I want to use to automate changing a value on a task when all it’s subtasks are marked as completed and the task status is changed to a specific status.

The reason I need this is because I want to add a subtask when the status changes, but I don’t want to add it if there are pending subtasks. My main issue is with tasks that don’t have any subtasks, since they do not pass the “All subtasks are marked as completed” check.

Is there a way to achieve this with either that or a different check?