IDML export corruption
This bug produces an IDML file with misplaced or missing elements.
It stems from having a second master page based on another master page.
When that second master page (based on another) is applied to a page in document, then saved as an IDML, the resulting IDML file will have misplaced or missing elements on the relative pages.
While viewing the second master page (based on another), choose Override All Master Page Items from the side Pages menu. OR, simply do not base any master pages on other master pages. The resulting IDML file will look exactly like the original INDD file.
Adobe InDesign 2020, Version 15.0.1
MacOS Mojave, Version 10.14.6
Ron Klein commented
The workaround is proving unreliable and can cause other issues. It seems best solution is duplicating original file and Overriding All Master Page Items in the document itself (not touching the Master Pages). Then create the IDML file.