Would you choose it again from this point?
Time already spent cannot be recovered by spending more time on the same task. If a book has stopped being useful, the hours already read do not make its remaining chapters valuable. The next decision concerns future benefits and costs, while past effort matters only if it changes what is possible now.
Go deeper
Past effort is not a future benefit
Suppose you have spent three evenings repairing a broken lamp. You now discover that the remaining repair requires unavailable parts. The earlier work cannot make those parts appear.
A sunk cost is a cost already incurred that cannot be recovered. Continuing should depend on what happens from this point, rather than on a desire to justify the earlier expense.
Past work can still matter when it creates something useful. Skills gained, reusable components or a nearly finished repair may change the value of continuing. Those are present consequences, not reasons to count the same effort again.
Ask whether you would accept the remaining task today, given its current condition and the alternatives available.