Make sure that the tool action is deactivated/finished exactly for the canvas it was started
When switching canvases (creating new ones), it might happen that the
tool proxy will be switched right in the middle of the stroke. In
such a case we should deactivate/finish the action of the *old* canvas,
not the new one.
BUG:398968