I am not asking this to be transphobic or anything but I had this debate with myself at 2 o’clock in the morning and every time I remember it I can’t focus.
On one hand, it is what they want. Let’s assume it causes no harm to them or any unforeseen circumstances.
On another hand, it would erase their identity as trans people. At the extreme you could consider it a genocide, since turning them into what they want would mean there is no more trans people and their unique identity is erased.
So you tell them, preferably ask them, first. That’s why surgeons make you sign consent forms.
Surgery has risks, magic in this case does not.
If you modify the thought experiment slightly, it becomes an interesting trolley problem.
Let’s assume the spell you’re using is all or nothing - either it cures everyone, or no one. What if some subset of people explicitly do not consent? How many people would it have to be, or what percentage, before you would consider not doing it? Obviously if only 1 person doesn’t want it, who cares, greater good, but what if it was 99% of people? Where’s the line?
A utilitarian, in that case, would always choose to cure everyone. Greatest good for the greatest number.
If your morality is a bit more nuanced, things get very muddy very quickly.