Completely understand that you want your ds to be able to chose to wear the girls uniform if he wants. And in an ideal world that would not be a problem.
However we do not live in an ideal world. Children can be very cruel and they will pick him out as being different by wearing the girls uniform, and in school anything which is remotely different will make them a target.
And yes in an ideal world, the 'target' will develop a thick skin and not care what others think. But realistically if he becomes the target of bullies he will not get out of that situation for his entire time at primary school, even if he decides to change to wear the boys uniform. Instead of not caring what people think, his life there may end up being pretty damn miserable.
As a mother of a child who was bullied both emotionally and physically very very badly, for being 'different', please rethink this.
My ds lost all confidence, his 'difference' was nothing he could change, and he is now a withdrawn anxious teen, STILL the target of bullies and its heart breaking.
At 4, I would encourage him to wear the boys uniform and keep the dresses for home for now. If, in a year or 2 of being at school he still wants to wear the girls uniform then address it again then. Because by then he will understand how things are in schools.
But think very carefully before making your very young son, who does not know the consequences of being an individual as yet, a target.
If he becomes one. It will continue. And most schools unfortunately do not deal with bullying in the way that you think they might.