What you've encountered is known as eventual consistency: after you make changes to entities (=delete), the indexes are updated asynchronously. This means that delete operation returns, but indexes are not yet updated. Since query relies on indexes it will show deleted data until indexes are finally updated.
There is a series of articles if you want to learn how datastore works under the hood.