Most JSON Schema bugs are silent. Your type says one thing, your serializer does another, your schema says a third. You find out at runtime.
lean4-json-schema makes those three things the same thing, by construction. If they don't agree, your code doesn't compile.