Well, it's already a well-established principle that, when you take taxpayer money from the government, the government gets to attach conditions to it as they see fit. That's not a violation of any individual rights.
https://www.scotusblog.com/2022/06/court-strikes-down-maines...