The earlier “what does not invalidate prayer” section states that a passer crossing through the worshipper's Sajdah-area does not invalidate the prayer, although the passer can be sinful.
So two issues must be separated: the passer's conduct and the worshipper's prayer validity. The passage of a person or animal is not itself treated here as an automatic prayer-breaker.