I understand your goal. To accurately detect the tilt of both windows, you need a separate sensor on each window.
Currently, the setup places the magnet and Shelly sensor close together when the window is closed, indicating a closed state. If you open one window with the Shelly component, it shows an open/tilted state. However, if both windows are tilted, the magnet and Shelly sensor realign, causing the sensor to show a closed state again.
This setup only indicates when either the left or right window is opened. It won't accurately show both windows in tilt mode.
You need a Shelly door/window sensor for each window frame to properly detect if a window is tilted open. The smaller device is the magnet, and the larger component is the Shelly sensor.