The same thing happens with UI Sliders. If you drag a slider and move the mouse off-screen it gets stuck to your mouse when you return to the canvas https://www.babylonjs-playground.com/#BXMTCD#95
EDIT: Related thread PointerDragBehavior doesn't cancel drag when you mouse up outside the canvas