Repository: tauri
Issue: [bug] Slightly incorrect inner window size when using window shadows + decorations disabled on Windows
Labels: type: bug,status: needs triage

### Describe the bug

When displaying a window with shadows on and decorations off, the inner size of the window is slightly smaller than it needs to be, creating a black or white border on the bottom and right. See the following examples (you may have to look closely, lol):

<table>
  <tr>
    <th>No shadows, no decorations (fine)</th>
    <th>Shadows, decorations (fine)</th>
    <th>Shadows, no decorations (bugged)</th>
  </tr>
  
  <tr>
    <td><img src="https://github.com/user-attachments/assets/c92aac4e-a59e-410d-ac32-6ca08ba230ea"/></td>
    <td><img src="https://github.com/user-attachments/assets/4a636b0a-46fd-4107-9da4-9b2630170169"/></td>
    <td><img src="https://github.com/user-attachments/assets/91e4efcf-f830-49b9-9eda-0df90b344348"/></td>
  </tr>
<table>

Something I believe is related: when "Show the accent color on the following surfaces -> Title bars and window borders" is enabled (which I have set in the above screenshots, the problem persists even with the setting disabled), only the top and left borders show said color. This was partially fixed in https://github.com/tauri-apps/tao/issues/997 so that too may have something to do with it.

### Reproduction

```rust
WebviewWindowBuilder::new(app, "main", Url::parse("https://google.com/"))
    .resizable(true)
    .decorations(false)
    .shadow(true)
    .build()?;
```

(Set Google to dark mode to be able to see the right/bottom better)

### Expected behavior

The black/white color on the right and bottom should not be there, and the accent color border should wrap all the way around all four sides (when enabled).

### Full `tauri info` output

```text
[✔] Environment
    - OS: Windows 10.0.19045 x86_64 (X64)
    ✔ WebView2: 131.0.2903.112
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 22.11.0
    - pnpm: 9.5.0
    - yarn: 1.22.19
    - npm: 10.9.0

[-] Packages
    - tauri 🦀: 2.2.0      
    - tauri-build 🦀: 2.0.4
    - wry 🦀: 0.48.0
    - tao 🦀: 0.31.1
    - tauri-cli 🦀: 2.0.0-beta.16
    - @tauri-apps/api : 2.0.0 (outdated, latest: 2.2.0)
    - @tauri-apps/cli : 2.0.0 (outdated, latest: 2.2.2)

[-] Plugins
    - tauri-plugin-process 🦀: 2.2.0
    - @tauri-apps/plugin-process : not installed!
    - tauri-plugin-fs 🦀: 2.2.0
    - @tauri-apps/plugin-fs : not installed!
    - tauri-plugin-single-instance 🦀: 2.2.0
    - @tauri-apps/plugin-single-instance : not installed!
    - tauri-plugin-window-state 🦀: 2.2.0
    - @tauri-apps/plugin-window-state : not installed!
    - tauri-plugin-http 🦀: 2.2.0
    - @tauri-apps/plugin-http : not installed!
    - tauri-plugin-autostart 🦀: 2.2.0
    - @tauri-apps/plugin-autostart : not installed!
    - tauri-plugin-shell 🦀: 2.0.2
    - @tauri-apps/plugin-shell : not installed!

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: https://discord.com/app
    - devUrl: https://discord.com/app
    - bundler: Vite
```


### Stack trace

```text
N/A
```


### Additional context

https://github.com/SpikeHD/Dorion/issues/268