Running stats and index stats on the system.* collections can cause errors because of insufficient permission. The 3 roles listed in the README.md doesn't provide enough permission for this, neither do I think it makes any sense to run against these collections.
Without legacy shell it doesn't cause any problem because the legacy shell print the error without throwing any exception. While with the mongosh, this kind of errors will break the script.
As stats doesn't make sense on these system collections, I propose we should skip them.