Cannot save alerting rule changes when alert is created through the API

Grafana Version 9.0.3

I am using the alerting API with Python to create MySQL alerts: grafana/api/v1/provisioning/alert-rules
which is working fine.

But, if I try to use the UI to make a quick change to the alert query, it does not allow me to save the changes. It appears that it saves successfully, but when I go back into the alert the query is still the same as what I created with the API.

Is there a way I can quickly modify alert queries in the UI for alerts that have been created via the API?