The court has reserved judgment after hearing final arguments on the legality of barring a transgender woman from a women-only app.