This is just checks-and-balances at work, is it not? It’s by design.
The legislative branch can try again with another law, but if it doesn't change whatever made the law unconstitutional or detrimental to enforce, than the relevant branch will keep it dead.
The only condition in which the judicial branch regularly forces the executive branch to enforce laws is when the executive branch tries to legislate through selective enforcement; then the judicial branch will give an all-or-nothing ultimatum, but even then not enforcing is an option, just not selective enforcement.