I think this is the wrong question. The question assumes that AI is a derivative to your code. The reality is that there will come a day, sooner than you like, when the AI can replicate the application you wrote without your code. In that world, what does it matter what code is open vs closed?