Macros only work perfectly when “For All Apps”

Here's my preset. Please check the problem. If I try to work with only certain apps, the two folders work perfectly, but the remaining two actions work abnormally and then fail. If I get them to work with all of the apps as a whole (go to For All Apps), all four work perfectly. What's the problem?