We can draw all sorts of incorrect conclusions from statistics. The chart displaying bug density per language on GitHub does not say anything about the number of bugs resulting from using a dynamically typed vs a statically typed language. Bugs in a program depend on many factors: programmer’s skill, level of passion for the job, complexity of the domain addressed, maturity of the project, processes used (code review, etc.), tools used (code analysis, etc.), the level of testing involved, the leadership of a project, etc.
Static typing deals with bugs coming from using incorrect types. It eliminates them from scratch, while they need to be eliminated through code review, additional tools and/or testing for dynamic languages. We can safely say that statically typed languages save us from a category of bugs. That’s one of the reasons Microsoft created TypeScript.
What we could say though from the bug density chart is that niche languages have fewer bugs. I do have an idea why that happens, but it is just personal insight rather than based on a study, so I won’t comment.