I ran into the same thing and after a bit of searching on the forum, found the same question for an older version of the book:
which pointed to an older errata thread:
Though as someone in the question thread pointed out, it is interesting that enabling Pinning with a Collision Mask of 11 works, while the programatic route requires a Collision Mask that excludes PhysicsCategory.Edge.