It's a combo of two things for me, the tooling usually sucks and you have to get over the hump of learning the ins and outs of the language and the platform you are using it on.
Good tooling helps with the explorability so JS is manageable because you can runtime inspect what the heck is going on. The Chrome debugger is excellent for example. Most Lua game engines provide basically zero debugging beyond runtime errors and console output. Which makes exploring tedious.
Then learning a platform and the ins and outs of a language is much quicker in a statically typed language. Not only because the editor is much more empowered so you can explore the codebase statically but with a compilation step you also get a quicker feedback cycle for a lot of common errors. I found JS extremely tedious dealing with runtime errors with typos. TS basically makes that impossible.
I think that's why PICO-8 feels like a sweet spot for Lua because the platform is so small it's quick and easy to learn. And the code size restriction stop you from making anything complex enough to benefit too much from static typing. I still hate runtime errors for silly mistakes that would have been trivially caught.