Idk how to phrase this in a really potato way;
Not everything that is recorded or acknowledged in the game needs to be physically shown to you. The game is coded to recognise if you have caught a Pokemon or not quite simply, whether it exists on the physical 'Pokedex' or not.