### Godot version

v4.0.beta17.mono.official [c40020513]

### System information

Windows 11 22H2

### Issue description

If a focused subwindow is destroyed, DisplayServerWindows may still attempt to send mouse motion events to that window, because `last_focused_window` isn't updated until another window is focused.

```
ERROR: Condition "!windows.has(p_window)" is true. Returning: Point2i()
   at: window_get_position (platform/windows/display_server_windows.cpp:999)
```

### Steps to reproduce

Run the MRP, click some non-Godot application window to focus it, then click the "CLOSE" button in the secondary window. This destroys the window without re-focusing the main window, so hovering the mouse over the main window will produce the error message above.

### Minimal reproduction project

[native_windows_hover.zip](https://github.com/godotengine/godot/files/10573386/native_windows_hover.zip)

if (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE) {
		_send_window_event(windows[p_window_id], WINDOW_EVENT_FOCUS_IN);
		windows[p_window_id].window_focused = true;
		alt_mem = false;
		control_mem = false;
		shift_mem = false;
		gr_mem = false;
		
		_set_mouse_mode_impl(mouse_mode);
	} else { 
		Input::get_singleton()->release_pressed_events();
		_send_window_event(windows[p_window_id], WINDOW_EVENT_FOCUS_OUT);
		windows[p_window_id].window_focused = false;
		alt_mem = false;
	}
	if ((tablet_get_current_driver() == "wintab") && wintab_available && windows[p_window_id].wtctx) {
		wintab_WTEnable(windows[p_window_id].wtctx, GET_WM_ACTIVATE_STATE(wParam, lParam));
	}
}
void DisplayServerWindows::_process_key_events() {
	for (int i = 0; i < key_event_pos; i++) {
		KeyEvent &ke = key_event_buffer[i];
		switch (ke.uMsg) {
			case WM_CHAR: {
				
				if (!KeyMappingWindows::is_extended_key(ke.wParam) && ((i == 0 && ke.uMsg == WM_CHAR) || (i > 0 && key_event_buffer[i - 1].uMsg == WM_CHAR))) {
					static char32_t prev_wc = 0;
					char32_t unicode = ke.wParam;
					if ((unicode & 0xfffffc00) == 0xd800) {