javero, your composer was confused as to copyright law. Co-writers (book, music, lyrics, however writing responsibilities are divided) own the entire work JOINTLY, as per copyright law. Unless it is specifically stated otherwise in a pre-exiting copyright agreement, each collaborator owns not his own contribution but a share of the entire piece.
So you own half of the withdrawn score and the composer owns half of your "lousy" libretto. The composer can't, say, let Ariana Granda record one of the songs from that show without splitting the royalties with you (unless, again, you and the composer had a pre-existing agreement to the contrary).
***
yfs is basically correct, but there really is no comparison between the practice of singers claiming a share of song copyrights and TV/film studios owning screenplays and shows/films. The former practice was basically theft, and survived because songwriters were desperate to get their songs recorded.
The latter (usually film and TV) is called a "work for hire" and is a well-established principle of copyright law. It is true that film and TV usually pay better (unless a play or musical is a monster hit), but the more important point is that screenplay and teleplay writers are normally paid as they go, just like a plumber or electrician. If they are asked to redraft a screenplay, there is an additional payment for that, etc. (Further complicating the issue of ownership is that more often than not a different writer or team is hired to do each draft. In terms of final credits, there are often conflicts, which are sent to the Writer's Guild for arbitration.)
The principle applies to other types of writing as well. I worked as a marketing writer for a theater here in Palm Springs, writing their programs, press releases, and various other things. After I left, the theater continued to use material I had written--as it had every right to do. I had been a salaried employee and anything I wrote for them belonged to them, not to me.
By contrast, playwrights and novelists normally work for months or years on a project before they see any return. (Not always: sometimes a commission or "advance" is paid before work commences.)
But in general, as has been said above, playwrights make less money but control their own work; screenwriters make more money but give up control of their work to a studio or producer. Plays are "licensed" or optioned; screenplays are "bought outright".