>The logic above can support exactly the opposite conclusion: LLM can do dynamic typed language better since it does not need to solve type errors and save several context tokens.

If the goal is just to output code that does not show any linter errors, then yes, choose a dynamically typed language.

But for code that works at runtime? Types are a huge helper for humans and LLMs alike.