There are several dozen federal case precedents addressing the rights of transgender individuals under existing federal laws.
The cases most squarely on point and binding on the U.S. District Court for the District of Montana are Schwenk v. Hartford, 204 F.3d 1187 (9th Cir. Feb. 29, 2000) (holding that the Gender Motivated Violence Act (GMVA) applied to targeting of a transgender person) and Parents for Privacy v. Barr, No.18-35708 (9th Cir. Feb. 12, 2020) (rejecting arguments that a school policy protecting transgender students violated other students' rights).
To the extent that the Montana law was used in an attempt to do an end run around existing federal law protections of transgender individuals, it would probably be struck down as applied under the supremacy clause. Various other federal courts have found that transgender individuals are protected under:
- The Equal Protection Clause of the 14th Amendment to the U.S. Constitution
- Title VII of the 1964 Civil Rights Act,
- Title IX of the Education Amendments Act of 1972,
- The Equal Credit Opportunity Act,
- Title VII, Section 1557 of the Affordable Care Act,
- Title IX of the Affordable Care Act,
- The Fair Housing Act, and
- The Eighth Amendment to the U.S. Constitution.
The U.S. Supreme Court has repeatedly declined to grant certiorari to review or overturn these decisions protecting transgender rights (which isn't to say that it couldn't adopt new precedents overruling these decisions in the future).
So, in almost all areas where sex discrimination is prohibited under federal law, the Montana statute would have to yield to federal law. Federal law protections against sex discrimination aren't all encompassing, but the federal courts have not hesitated to invoke the Equal Protection Clause of the 14th Amendment when no statutory protections apply. So, there probably aren't many circumstances in which this law could have a meaningful effect.
The fact that a Montana state law might say otherwise is irrelevant.
The U.S. Supreme Court has recently specifically made clear to the Montana Supreme Court that it may not enforce state laws that violate federal law stating:
The Supremacy Clause provides that “the Judges in every State shall be
bound” by the Federal Constitution, “any Thing in the Constitution or
Laws of any State to the Contrary notwithstanding.” Art. VI, cl. 2.
“[T]his Clause creates a rule of decision” directing state courts that
they “must not give effect to state laws that conflict with federal
law[ ].” Armstrong v. Exceptional Child Center, Inc., 575 U.S. 320,
324, 135 S.Ct. 1378, 191 L.Ed.2d 471 (2015).
Espinoza v. Montana Dept. of Revenue, 207 L. Ed. 2d 679 (June 30, 2020).
Similarly, in another not too ancient case, the U.S. Supreme Court held that:
The question presented in this case is whether the holding of
Citizens United applies to the Montana state law. There can be no serious doubt that it does. See U.S. Const., Art. VI, cl. 2.
Am. Tradition Partn., Inc. v. Bullock, 567 U.S. 516, 516 (2012).
Another older and emphatic provision making clear that state officials must follow federal law from the U.S. Supreme Court is as follows:
Article VI of the Constitution makes the Constitution the ‘supreme Law
of the Land.’ In 1803, Chief Justice Marshall, speaking for a
unanimous Court, referring to the Constitution as ‘the fundamental and
paramount law of the nation,’ declared in the notable case of Marbury
v. Madison, 1 Cranch 137, 177, 2 L.Ed. 60, that ‘It is emphatically
the province and duty of the judicial department to say what the law
is.’ This decision declared the basic principle that the federal
judiciary is supreme in the exposition of the law of the Constitution,
and that principle has ever since been respected by this Court and the
Country as a permanent and indispensable feature of our constitutional
system. It follows that the interpretation of the Fourteenth Amendment
enunciated by this Court in the Brown case is the supreme law of the
land, and Art. VI of the Constitution makes it of binding effect on
the States ‘any Thing in the Constitution or Laws of any State to the
Contrary notwithstanding.’ Every state legislator and executive and
judicial officer is solemnly committed by oath taken pursuant to Art.
VI, ¶3 ‘to support this Constitution.’ Chief Justice Taney, speaking
for a unanimous Court in 1859, said that this requirement reflected
the framers' ‘anxiety to preserve it [the Constitution] in full force,
in all its powers, and to guard against resistance to or evasion of
its authority, on the part of a State. * * *’ Ableman v. Booth, 21
How. 506, 524, 16 L.Ed. 169.1112
No state legislator or executive or judicial officer can war against
the Constitution without violating his undertaking to support it.
Chief Justice Marshall spoke for a unanimous Court in saying that: ‘If
the legislatures of the several states may, at will, annul the
judgments of the courts of the United States, and destroy the rights
acquired under those judgments, the constitution itself becomes a
solemn mockery * * *.’ United States v. Peters, 5 Cranch 115, 136, 3
L.Ed. 53. A Governor who asserts a power to nullify a federal court
order is similarly restrained. If he had such power, said Chief
Justice Hughes, in 1932, also for a unanimous Court, ‘it is manifest
that the fiat of a state Governor, and not the Constitution of the
United States, would be the supreme law of the land; that the
restrictions of the Federal Constitution upon the exercise of state
power would be but impotent phrases * * *.’ Sterling v. Constantin,
287 U.S. 378, 397–398, 53 S.Ct. 190, 195, 77 L.Ed. 375.
Cooper v. Aaron, 358 U.S. 1, 18–19 (1958)
Any Montana government official who tried to enforce that law that has been held to be overridden by federal law in sheer defiance of federal law would end up like Rowan County, Kentucky Clerk Kim Davis: in jail for being in contempt of court in short order.