This is how it works at the moment:
If the modal displays a URL (and not custom HTML) it creates an iframe object and uses it to display the target page. Creating the iframe is expensive so it keeps that object for reuse even if you close the modal. Next time you open an URL using the same DayPilot.Modal object it should use that iframe - it should also be a bit faster.
Now, the problem with the demo is that it always creates a new DayPilot.Modal object (which is not in line with the iframe caching).
The reference to the cached object is available as DayPilot.Modal.div so you can remove the object manually:
modal.div.parentNode.removeChild(modal.div);
modal.div = null;
The next version of DayPilot.Modal will introduce .disposeOnClose property (it will be set to true by default). It will remove the div (and iframe) on close if set to true.