There is a third concept at play though, i.e. Supreme Court justices are appointed because of their view of what is and is not the prerogative of the court to do.
The court is not authorized to make law. The court is authorized to interpret and make rulings on the letter and intent of the law when there is disagreement about that.
The right of the people to govern themselves on matters outside the jurisdiction of the Supreme Court is seen as a conservative point of view. But it is the right point of view based on the founding documents and the Constitution that was ratified into law by the people of the late Eighteenth Century, has been amended especially on those issues that the Court believes were wrongly adjudicated of which there were many.
I am pretty sure the Court would rule that whether people can Transgender or not is no business of any part of the Federal government except what IS included in the Federal government. For instance it is entirely proper for the President to insist that no federal employees be hired just because he or she transgendered and that the military won't accept transgendered or transgendering people because of the special health issues that go along with them.
SCOTUS might rule that the President or Secretary of Defense/War can make such a policy as being within their authority to do so. But I'm pretty sure SCOTUS will think all other issues on transgendered should be determined by state and local governments.