describes
the waste of time and effort involved in continuing a discussion or undertaking that can no longer produce a useful result.
also
To flog a dead horse
Imagine a case where to continue wasting time and effort on something that cannot be changed, solved, or improved.; then “To beat a dead horse” fits well.