No, contributors to FOSS generally
do not give away their rights. They contribute to the project with the expectation that their contributions will be distributed under its license, yes, but individual contributors still hold copyright over their contributions. That's why relicensing an existing FOSS project is such a headache (widely held to require every major contributor to sign off on it), and why many major corporate-backed “FOSS” projects require contributors to sign a “contributor license agreement” (CLA) which typically reassigns copyright to the corporate project owner so they can rugpull the license whenever they want.
Stealing from FOSS is awful, because it completely violates the social contract under which that code was shared.