I can't speak for all licenses, but I'm familiar with at least one BSD license. That's almost the entire point of it...
You cannot take their literal code and call it your own. You can derive code from it and call it your own. That's what LLMs primarily do.