The decision has been condemned by trans rights advocates and by gender critical activists.