The proposal would have effectively barred transgender women from using the State Capitol restroom for female lawmakers. Some Republicans joined Democrats in voting it down.