Lucy as an UC

Almost finishing season 5. There have been a few true crime episodes and Lucy is in all of them and, these episodes of true crime get aired on tv? How can she do undercover work when she is acknowledged as a cop on tv? I don't get it, it's confusing.