I'm not a lawyer, so maybe I'm misinterpreting. However, due to the Supremacy Clause, I wouldn't think that a state law could preempt a SCOTUS ruling. Since they have ruled that the police have no duty to protect the public, then there can be no dereliction of duty. That duty doesn't exist.
Supremacy clause basically says that when a law passed by feds contradicts a law passed by a state, feds win. But being feds haven’t specifically passed a law granting immunity that would be irrelevant.
S. Ct. ruling basically said citizens couldn’t sue the police because the cops don’t have a prescribed legal duty. Said proposed law would impose such a duty. That wouldn’t contradict the the court. The court didn’t say the states couldn’t impose such an obligation on the police just that no common law duty currently exists.