No.
If your scenario were to happen (that of NY having to switch from communistic (er socialist) to republican BECAUSE of this inter-state agreement, then NY would simply refuse to follow the NPV agreement!
However, if OH were to vote “red” in the election, but PA and IL and NY voted “blue” then MA, PA, NY, IL and CA WOULD combine to “force” / “bribe” / “influence” Ohio’s electors to vote BLUE because of this agreement!
The socialist/communists ONLY follow “agreements” and “the law” WHEN IT AGREES WITH THEIR NEEDS!
That points to a bigger problem with these multi-state NPV agreements. They are probably unenforceable. If one state decides to unilaterally violate the terms of the agreement, then I don’t see what kind of recourse another state might have to enforce it.