Keldeo Bug(?)

So with the Swords of Justice trio in my party i went to Murk forest battled and caught Keldeo but it didnt said what pc keldeo was in, all it said was “would you like to give a nickname to keldeo” and “Keldeo’s data was added to the Pokedex” when I returned to the PC keldeo wasnt there, pls help

Did you have a party of less than or equal to 5 pokes? If you did, then whatever caught is placed in your party.