When I have encountered this error I found that refreshing the web page worked. The error seems to occur (for me anyway) when a background task completes while I am making changes. This changes the underlying YAML (generates a new version) causing my attempted changes to be applied to an older version. Refreshing the page and attempting the changes again applies the changes to the latest YAML definition.
But that is my experience. Your mileage (kilometerage?) may vary.