Racial segregation during the First World War, as well as in the Second World War, is confusing, contradictory, and a muddled mess. Just like racism. A nation could, for example, completely segregate one set of soldiers of color into specific units while allowing other soldiers of color to be mixed in with white soldiers. The clearest example comes from the United States which segregated African-American soldiers into specific regiments, but allowed Latino, Asian, and Indigenous soldiers to be in otherwise all-white regiments. I've written about this topic in the past in this answer which deals with the British Empire, but briefly mentions France and Germany.