Its giving version conflict error
...
"version_conflicts" : 1,
...
because some update happened at the same time you were trying to delete the documents. Try sending refresh=true in delete_by_query, that will make sure index is refreshed just before it tries to delete docs and reduce your chances of getting version conflicts.
If it still happens and you want some more robust solution, you can write some code to retry delete_by_query 3 (or more) times by catching ConflictError. That will work similar to how retry_on_conflict works in case of _update calls.
You can check out this doc: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-by-query
PS: From personal experience, you can't completely get rid of the version conflict issues (its just something you gotta make peace with, when working with elastic) but you can reduce them by using things like refresh or retry_on_conflict, etc.