A SCOTUS decision is supposed to be binding to whatever act HAD been passed. Whether that happens in effect is entirely dependent on the (usually) executive branch complying with the SCOTUS ruling. Congress can, if it wanted, re-pass the law. Obviously, it would make a subsequent suit and overturning easier, but in reality, it can, and has happened in the past.