Hundreds turned out in Sydney to demonstrate against a proposed anti-transgender bill, after the event was banned by the Supreme Court.