The ex-SNP leader, who is stepping down from Holyrood this week, has defended her support for the trans community.