Hi,
According to this post: Deleting log files after they have finished processing - Meta Elastic / Elastic Tips and Common Fixes - Discuss the Elastic Stack.
It's not possible to delete a file in filebeat after processing it. You need to take the file in logsatsh input and use the same configuration as shown in the post I share.
Cad.