A bill involving transgender bathroom use has passed a second reading in the Senate following significant changes.