I think vit. D is generated from a reaction of a protein with UVB.
UVA is rather destructive, so I would assume that’s what’s going on — to much UV-A on a part of the shroom that by design is shielded from direct exposure, is basically breaking everything down.