A motion at the Scottish Labour conference which backed guidance on single sex space in schools based on biology has been rejected.