Xaiomi window/door sensor cycles between open and closed

This MCCGQ11LM device is mounted on a window
When the window opens, the device goes from closed to very briefly open to very briefly closed to open. It does the same thing when the window is closed

I have another sensor set up on the window next to this one and it works fine

This is the Zigbee device Signature. It is exactly the same for both devices.

{
  "node_descriptor": "NodeDescriptor(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4151, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=0, maximum_outgoing_transfer_size=100, descriptor_capability_field=0)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x5f01",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0003",
        "0xffff"
      ],
      "out_clusters": [
        "0x0000",
        "0x0004",
        "0x0006",
        "0xffff"
      ]
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.sensor_magnet.aq2",
  "class": "zhaquirks.xiaomi.aqara.magnet_aq2.MagnetAQ2"
}

Polite bump