With AI it is important to catch errors/hallucinations early, static typing helps with that.

So languages with dynamic typing might hide some errors until runtime, static typing one could catch that during compilation.

With dynamic ones you need way more tests to cover some of the scenarios that compiler does for others.

And there is significant amount of code written "for ages" in languages that were there longer, like C, C++, Java (yes, I know that python is quite old, older than Java - 1991).