Keep focus when switching between programs

When I switch back to logseq from another program, the cursor cannot keep focus. So I have to click once with the mouse before I can input.