The Institute knows they feel pain, you observe them testing on synths and talking about it and they will inflict pain on synths without compassion because they simultaneously say that synths aren't really suffering which makes no sense! Now, Glory is one of the few synths that hasn't been memory wiped, and synths will tell you that life as a slave is a horror show. Dr Carrington tells you the agents have been suffering PTSD. Well, the funny thing is, there's one immediately offered when you return to the Railroad.
When Glory didn't disappear, I decided to play as if that was what had happened. There's not a lot of freedom in the game, so to hell with what is supposed to happen. Glory is supposed to die, and the characters around her stop noticing her, and talk about her as if she's not there, as soon as you kill the Institute. The list of agents - dead ones are crossed out.