Pan mode with mouse middle click in linux os

Hi , i noticed a problem with krita in linux os , I’ve tried krita in many linux distros and they all share the same issue. When i am drawing using the pen than immediately use the mouse after i can’t pan to navigate the canvas , it shows the panning icon but it doesn’t work , i have to click something else with the mouse first then get back to the canvas to be able to pan with the middle click ,

Panning with the digital pen works fine , panning when using the mouse also works fine , it’s when switching between the digital pen and mouse that makes the problem

It’s honestly annoying and the only reason that makes me go back to windows everytime . And i hope if there’s any possible way to make it work