Actually not even specific to Pipeline.
This code gets run when you delete any job. And it will delete the latest build if it is running:
INFO: somejob #2 completed: ABORTED
But if the job is set to be concurrent-capable (freestyle projects are not by default, Pipeline projects are by default), and you in fact have multiple builds running, the earlier running builds will stay in the system, potentially causing mayhem.
Probably the implementation should also wait for, say, 10s for the build to actually finish aborting before proceeding.
There is one additional detail that freestyle projects do which Pipeline currently does not: prevent new builds from being scheduled.