What do you think would happen if one of the red state governors tried to segregate public schools? Federal troops would be on the ground in minutes and it would be stopped immediately. Why did the same thing not happen to "sanctuary cities?"
Segregation of schools is a federal law, so POTUS can enforce.
.
Sanctuary cities is a gray area, that has gone through the court system, because it involves Federal immigration law but also state's rights. Federal regulation has mostly prevailed but still not 100%.
.
The issue of masks, church closings, distancing, etc all falls under state law, depending on the powers each state has given to its governor and its health officials during a 'health emergency' (usually a 30-45 day declaration by the governor, during which he has very wide powers). Each state is different and the federal govt is largely unable to affect this, unless marshall law is declared (which is an unprecedented step, and could still be challenged in the courts).