The issue was that the propagation of referenced anonymous attributes treated
geometry outputs of the foreach zone as "normal". That means that every
anonymous attributes referenced by the input socket would also be referenced by
the output socket.
However, just like in the repeat zone, this so called "propagate relation" needs
some special behavior, because anonymous attributes references created inside a
zone have to remain inside that zone. Instead, the output node creates a new
anonymous attribute reference that is used outside of the zone.
Pull Request: https://projects.blender.org/blender/blender/pulls/132560