I have been through a similar issue. The value at the date field (in your case the value of cq:lastModified) had a wrong format, e.g:
cq:lastModified: 2023 2023
Of course 2023 2023 is an invalid date format.. it should be something like 2023-02-24. The consequence was that the data type of the cq:la...