How do I make the game discern between a baby and normal version of a mob?

Hello, I'm making a datapack that contains an advancment for killing every unique mob in the game. I ran into an issue with the game not being able to discern between baby and adult mobs. Whenever I kill a baby horse I get the achievement for the adult as well. Even tho im using
"flags": { "is_baby": false } on adults and true for babies am I missing something or is there no way to do that?
Continue to help post