You know, it's weird, but I'm not sure how much is learned behavior and how much is inborn social bias...
I teach middle school. There is a pretty fair amount of fraternization between kids of all races at this level. Then you see those same kids when they get to high school (we share a campus) and there's already some obvious self-imposed segregation starting to happen.
And anecdotally, a lot of my friends from school growing up who never displayed any kind of racial bias at all (and indeed would hang out with black, Hispanic, Asian, etc. students like it was not big thing) have, in adulthood, turned into card carrying MAGA types (or in some cases full blown alt-righties) screeching about race constantly.
I think the sad truth is we're hardwired for tribalism and race presents the easiest way to separate people into groups. And whatever the reason, my observation is that those things tend to increase with age. It's not really kids that are the issue, it's adults. Maybe it's learned behavior, but I've seen enough of it manifest that I can find no parental influence on that I believe there are other factors at play.