You can avoid this bad ending by telling the priest bot the truth a couple of days before ,when you meet the priest bot shortly after talking to Shanice about her feeling uneasy about the priest bot , he will be kind of sad/hurt but he understand her feelings. When you then go to the lab the priest bot will come with you and he will deactivate the cameras that caught you inside lab, preventing the bad ending.