With JPA to do an update you read the object, then change it through its set methods, then commit the transaction. Updates using update-all queries are normally reserved for batch type situations.
Your issue, assuming you are using the same EntityManager is that the first query loads the objects in the persistence context, the update-all is only updating the database, not the object, and your third query must return the same object.
You should edit the object, instead of execute update-all queries, that is how JPA is supposed to be used.
i.e.
people = em.createQuery("SELECT p from Person p");
java.util.List oldLlist = q.getResultList();
....
//Step 2: update the name
....
for (Person person : people) {
person.setName("new name");
}
em.getTransaction().commit();
If you really want to use the update-all query, you could call clear() after to reset the persistence context, or get a new EntityManager. If you are seeing stale data across transactions, it could be a caching issue, you may need to invalidate, clear, or disable the shared cache.