Cannot Capture Mouse in Editor Preview

Hi,

I am developing a multiplayer game. During testing, I am using a dedicated server with 2 client windows. The clients connect to server normally and the first window that launches capture the mouse and works ok. But once I start switching between the windows by clicking on each one, the mouse capture is intermittent. Sometimes, there will be a click. Sometimes, the mouse draws a green rectangle on the client window instead. I am not sure how to make it work.

To exit the mouse from the first client, I used windows key.

Thanks,