saveMacroData/getMacroData delays?

I have a macro with a custom editor.
Now, whenever the macro editor “save” button is pushed, i save the macro properties using

AP.confluence.saveMacro(props)
AP.confluence.closeMacroEditor();

In the page preview, my macro gets reloaded and i use

AP.confluence.getMacroData(function (data) {})

to adjust the preview. However, the macro data i get back are the “old” data, before the edit.
If i just refresh the edit page, the macro data are as i expect them to be.

Why is this? Can’t i use getMacroData this way?

I have the same issue, and a long running bug ticket where I have explained the same behavior to Atlassian, but no response yet.

Have you come up with a workaround? I tried using events in the JS API, but that didn’t work as i hoped.
My current workaround is storing the macro editor data in local storage with a revision parameter.
Then, in the preview, i compare revisions with what is stored in local storage with the data i get from confluence “getMacroData” function.

Unfortunately we have not come up with a workaround yet.
Switching to URL params will help though because you don’t have to read the params with getMacroData but you could read them from the URL. But this way you cannot use cacheable iframes.