by illegal mons by you mean unreleased ones, Shiny locked ones and stuff? If so while you don't hear about it often there are people who keep shiny locked mons in their save without any issues but just to be safe just don't. Or have a backup save and put them there.