fix(es/optimization): preserve JSON numeric values (#12051)