Anti-affordance is the prevention of an action or interaction. (Norman, Design of Everyday Things). A window affords visibility. However, it’s anti-affordance results in birds flying against it.
Example
Anti-affordances are also deliberate designs that prevent undesirable actions.
Example found online: Park seats the prevents sleeping by having an arm in the middle.
Example found in the real world: A bench that prevents skateboarding by placing metal obstructions.