Equalities minister says ‘more extreme ideas’ about transgender rights have been defeated and gender ideology had got off track