"Children spend more time at school than they do with their parents, and because of that they gradually learn different moral values while they are growing up in school."
This is how I would write it, if you mean to say that children learn moral values at school that are different from what they learn at home