Repository: godot
Issue: Several issues and inconsistencies with Unfocusable property in Window node on Windows 11
Labels: bug,platform:windows,topic:porting

### Tested versions

- Reproducible in: 4.2.2.stable

### System information

Godot v4.2.2.stable - Windows 10.0.22631 - GLES3 (Compatibility) - NVIDIA GeForce GTX 1050 Ti (NVIDIA; 31.0.15.5222) - 12th Gen Intel(R) Core(TM) i3-12100F (8 Threads)

### Issue description

For context, the project has `display/window/subwindows/embed_subwindows` set to false

- Setting unfocusable property of a Window node to true via editor will make the window still interactable. In addition, if Unresizable is also set to true via editor, the window will have the minimize button not deactivated (clickable).
- When a window is unfocusable, process inside the window seems to stop.
- Setting unfocusable property of a Window node to true from code without a delay will cause the process inside window to stop/freeze

Could be related to https://github.com/godotengine/godot/issues/90195

For more info, please look at the **Steps to reproduce** below

### Steps to reproduce

Download and open the MRP with Godot 4.2.2 . Open the main scene. Click the Window node on the Scene tab and make sure these two exported variables set to **false** on the Inspector tab. 
![image](https://github.com/godotengine/godot/assets/64251396/7baf9510-4750-4a8b-ad44-ef8c4bd8e9e0)
Then run the project. Let's call this `State A`, where both unfocusable_at_start and delay_before_unfocusable is **false**.
Notice that:
- A window that has Unfocusable set to true in the editor doesn't actually has that property (the window still clickable, and seems to be focused, even though the text says that Unfocusable set to true.). Though, when interacting with the window (clicking the title or the inside), the title bar still look like it was unfocused by Windows 11 standard (looks gray)
![image](https://github.com/godotengine/godot/assets/64251396/98b5cbc3-18bb-4639-b270-b9c425e04667)
Also, despite having Unresizable property, the minimize button is clickable, even though it says that Unresizable will disable the minimize button.
![image](https://github.com/godotengine/godot/assets/64251396/e5bf0849-30fa-404e-bff8-0b72297a53a2)
If you hover the mouse on top of the icon window, notice that the big button on the main window looks like it was not hovered. And clicking the icon window won't click the big button. Let's call this `Behavior X`.
Clicking the `Toggle Hide Button on Icon Window` will show the small button inside that window. When you press it, notice that the counter (on the label) goes up. Meaning that it is interactable, something that isn't supposed to be able to be done if Unfocusable is true.
![image](https://github.com/godotengine/godot/assets/64251396/41c54909-8da0-4c45-ba82-ab0a0a0597cf)
- Clicking the `Toggle Unfocusable` button once will toggle the Unfocusable property of window to false, and shows that there are no difference, proving the point. Though, this one, the window will show the title color correctly when being focused/unfocused (try clicking the main window and then the window with spinning logo back and forth)
- Clicking it the second time, will toggle the Unfocusable property of window to true, which is the same as when the project is being runned, but notice that this time, the window is truly unfocusable. The close button and the minimize button cannot be clicked.
- Hovering the mouse on top of the icon window,  the big button on the main window looks like it **was** hovered. And clicking the icon window **will** click the big button. Let's call this `Behavior Y`, which is different than Behavior X, despite both are in the same state of Unfocusable being true. The Behavior Y still applies even when the small button is visible on the icon window.
- Notice that the spinning icon will also stop, and pressing the `Toggle Hide Button on Icon Window` does nothing. This behavior is consistent whenever the window is Unfocusable, **except** when running the project for the first time with State A.

Now close, try setting unfocusable_at_start to **true** and delay_before_unfocusable to **false**. Let's call this State B. Re-run the project.
- The icon window will shows only the background (blank)
![image](https://github.com/godotengine/godot/assets/64251396/d7518826-207a-411b-8522-3f26a9b4b955)
- Pressing the `Toggle Unfocusable` button will shows the icon normally again

Close again, try setting unfocusable_at_start to **true** and delay_before_unfocusable to **true**. Let's call this State C. Re-run the project.
- Now the icon window will immediately freeze. The icon window did shows the icon, unlike state B. It also have the same outcome as running State A then pressing the `Toggle Unfocusable` button twice.

### Minimal reproduction project (MRP)

[window-bug-test.zip](https://github.com/godotengine/godot/files/15249473/window-bug-test.zip)