Choosing GPL and similar licenses is the only way you can publish open source software without running this risk. As professional programmers, we must insist that people either pay us for our work or act as a equal collaborators.
And yes, there's a reckoning coming for AI companies who trained their models on GPL software.