oh! I find the key problem. I should set “set input mode ui only”. Then it will not lose focus when I click mouse button.