Updating firewall filter expression occasionally returns an error "config duplicates an already existing config"

I am using the following PUT call to update a filter expression in a firewall rule using the Cloudflare filters api:

curl -s -X PUT
https://api.cloudflare.com/client/v4/zones/$zone_id/filters/$filter_id
-H “X-Auth-Email: $email”
-H “X-Auth-Key: $api_key”
-H “Content-Type: application/json”
-d ‘{
“id”: “$filter_id”,
“paused”: false,
“description”: “block filter rule”,
“expression”: “ip.src ne 73.17.98.218 and ip.src ne '”$new_ip"’"
}’

The call mostly works, but I occasionally get the error “config duplicates an already existing config”, even though the two filter expressions are not duplicates:

existing expression:

“ip.src ne 73.17.98.218 and ip.src ne 2a09:bac1:76a0:1408::6a:5f”

new expression:

“ip.src ne 73.17.98.218 and ip.src ne 2a09:bac1:76e0:1408::6a:5f”

I have to use the WAF dashboard to fix the firewall rule

I have discovered that if I read the firewall filter rule before updating it, I don’t get the error. Perhaps the documentation should be updated to reflect this?