This could be the result of getting query results from the cache.
There is no difference between criteria queries and string based JPQL queries regarding the cache (and actually every criteria query it converted by ObjectDB to JPQL). But some cache operations cannot be used with queries that return values rather than entities, so these queries are different.
Could you please post the configuration file that you are using, demonstrate the queries and explain how updates are performed?
Note that updates by queries bypass the cache and may result in not being seen by queries:
"Updating entity objects in the database using an UPDATE query may be slightly more efficient than retrieving entity objects and then updating them, but it should be used cautiously because bypassing the EntityManager may break its synchronization with the database. For example, the EntityManager may not be aware that a cached entity object in its persistence context has been modified by an UPDATE query. Therefore, it is a good practice to use a separate EntityManager for UPDATE queries."