Suppose we have a Lagrangian invariant under Chiral symmetry, such as QED with massless fermions:
$$ \mathscr{L} = -\frac{1}{4} F_{\mu \nu} F^{\mu \nu} + \bar{\psi} i \gamma^{\mu} D_{\mu} \psi .$$
In all textbooks and other posts on this website it is said that Chiral symmetry protects against the generation of mass terms at loop level. But if Chiral symmetry is an anomalous symmetry and it is broken at quantum level (making the Ward identities incorrect) how can it protect against the generation of mass terms? Is maybe Chiral symmetry not broken for QED and other simple theories? What am I missing in this picture?