Buffer zone not working

In my InfluxDB tasks I have a buffer zone of +/- 5% so I don’t receive borderline alerts. For example if WARN is more than 70% I don’t want to receive an alert at 70.01% but instead at 75%.
This way we don’t have as much alerts that are always changing, for example OK alert at 69.99% and WARN at 70.01% .
I’ve put a couple of filters that I think should work but sadly they are not:

// If goes from warn to ok but used_percent more than 75%, exclude
        |> filter(
            fn: (r) =>
                not (r["lastReportedLevel"] == "warn" and r["_level"] == "ok" and r["used_percent"]
                    >=
                    75.0),
        )
        // If goes from ok to warn but used_percent less than 85%, exclude
        |> filter(
            fn: (r) =>
                not (r["lastReportedLevel"] == "ok" and r["_level"] == "warn" and r["used_percent"]
                    <=
                    85.0),
        )
        // If goes from crit to warn but used_percent more than 89%, exclude
        |> filter(
            fn: (r) =>
                not (r["lastReportedLevel"] == "crit" and r["_level"] == "warn"
                    and
                    r["used_percent"] >= 89.0),
        )
        // If goes from warn to crit but used_percent less than 92%, exclude
        |> filter(
            fn: (r) =>
                not (r["lastReportedLevel"] == "warn" and r["_level"] == "crit"
                    and
                    r["used_percent"] <= 95.0),
        )

Hope someone can maybe see the issue and try to resolve it.
Thanks in advance