We are using a cronjob that fetches all search tasks, using the endpoint you referred to, and cancels the tasks that have been running for more than 60 seconds, using their task ids.
It'd be better to time out on the client side instead of using the task-cancel API, but either way the behaviour you're describing sounds like a bug to me.
I'll share the endpoints requested next time it happens. Anything else I could share to figure out why the cancellation doesn't work for us?
I think tasks and hot threads should be enough to get started.