As I mentioned in a previous reply¹ to a post of yours, 15 years ago I hit one of Lua's many footguns when I mistakenly used Lua as an alternative to JSON. To my knowledge no version or variant of Lua has made any progress on addressing this issue.
Lua is nice in many ways but unless you have a pressing need for it I'd recommend sticking with JSON. If you really want executable configurations please consider a newer language like https://dascript.org or https://cuelang.org which provide better type safety.