Court bars Trump on transgender troops policy