"ruled that it's okay" != "left the law in effect"
"U.S. District Court" != "the states"
Whatever a state statute may or may not say about a defense, applicable federal constitutional defenses always stand available when properly asserted. See U. S. Const., Art. VI. Many federal constitutional rights are as a practical matter asserted typically as defenses to state-law claims, not in federal pre-enforcement cases like this one.
"U.S. District Court" != "the states"
Whatever a state statute may or may not say about a defense, applicable federal constitutional defenses always stand available when properly asserted. See U. S. Const., Art. VI. Many federal constitutional rights are as a practical matter asserted typically as defenses to state-law claims, not in federal pre-enforcement cases like this one.
https://www.supremecourt.gov/opinions/21pdf/21-463_3ebh.pdf