You write several novels and transfer copyright to a publisher in exchange for royalty payment.  When you die your heirs have a legally granted option to negate the transfer of copyright.  This option limits how much your publisher will pay you for the copyright.  So you attempt to block your heirs by entering a second contract which pre-emptively regrants the copyright.

Eventually you die and your heirs ask the courts to declare your pre-emptive contract invalid.

You are (or were) John Steinbeck and your case is before the Supreme Court. If I am reading this right the appelate court decision went against the heirs.  And remarkably the Songwriter’s Guild of America filed an amicus brief in favor of the heirs. (ascot angle: scotusblog.)