Handle optional deletion mark properly and include logical deletion verification in the update entity query