From David Scott Kastan, Shakespeare Didn't Write Alone, The Atlantic, June 8, 2019:
So, early and late in his career, Shakespeare worked with other playwrights. In the middle, other playwrights seem to have worked with him, or at least worked on his scripts. The playwright Thomas Middleton had a hand in Macbeth, probably in Timon of Athens, and likely in both Measure for Measure and All’s Well That Ends Well.By way of comparison I note that Duke Ellington wrote specifically for his band. The personel was relatively steady, with many musicians remaining with him for decades; his baritone saxophonist, Harry Carney spent a 45 year (I believe) career with him. Ellington tailored the parts specifically to the capabilities of his musicians. And, as well, he took ideas from them and turned some of them into full-fledged compositions and arrangements, often enough without sufficient acknowledgement (see Terry Teachout's excellent biography, Duke: A Life of Duke Ellington). During the last half of his career he worked extremely closely with Billy Strayhorn, who had composed the band's well-known theme song, "Take the A Train."
No doubt there are other collaborations in the Shakespeare canon. That’s the way plays were composed. The plays of the Elizabethan theater were not written like Lord Byron’s poems or Virginia Woolf’s novels in a room of his or her own. They were more like our movie or TV scripts, which might combine several ideas from a writers’ room or get reworked by one or more “script doctors.” In the account book of the theater manager Philip Henslowe—the most important surviving document testifying to how plays were written in Shakespeare’s time—nearly two-thirds of the plays mentioned are in some sense collaborative. A team of playwrights might have completed a script by writing one act each, as was the case for a play Henslowe commissioned in 1602 from Anthony Munday, Michael Drayton, John Webster, Thomas Dekker, and Middleton. And old plays were regularly updated, as when Henslowe paid two playwrights, Samuel Bird and William Rowley, for “additions” to Marlowe’s Doctor Faustus.
It's time we liberate creativity from the myth of the lone genius. Creativity is often collaborative, various, and even collective.