This is a great question, but I feel that the better question is: If a model was trained on open source code, should all code created by that model then be subject to the licensing from the code it was trained on?
I don't think it works like that, because if you use GPL code, then all derivative works of the code must be Open Source too. But you no longer know the original project and maintainers anymore and the original source code is "lost". So just using GPL code to train wouldn't solve the issue I think. The source code and license MUST give permission to do so, I feel like. And then all original source codes contributors that has been used to train have to be included in every project that makes use of LLMs output. I have no idea in detail, but its more complicated then just declaring the output to be Open Source automatically.