In Jenkins classical UI, users can interrupt builds using the stop button (little red cross) attached to each busy executor. Clicking this button displays a confirmation dialog (with the full display name of the build about to be interrupted, which is good). Then, on confirmation, a stop request is POSTed to the executor URL, which is something like this:
(and I guess it's not the only options, but you get the idea: the target is an executor, not a specific running task)
Between the initial click on the cancel button and the stop request actually reaching the server, many things can happen (especially if the user hesitated on the confirmation dialog). The target executor identified by its name+number can now be executing something completely different from the build that the user was intending to interrupt.
This is not a theoretical issue: I've came across this yesterday while doing the post-mortem analysis of an unintentionally interrupted deployment Pipeline
I will submit a WIP PR with a proposed change to avoid this issue...