Strange. I cannot reproduce this effect. I put here the example
1. Push the button 'Show Form 1', the Window 1 is shown
2. Push the button 'Show Form 2', the Window 2 is shown. It overlaps the Window 1
3. I click on the editor in the Window 1. The Window 1 is brought to front, the editor 1 has the caret. I can directly start typing.
4. I click on the editor in the Window 2. The Window 2 is brought to front, the editor 2 has the caret. I can directly start typing.
Due to this description, all works correctly.
What is your result of this test?