The decision threw out the administration’s proposed regulations, which prohibited discrimination based on gender identity.