Disable undo registration while saving the backgroundApplicationContext to prevent sync changes from being pushed onto the undo stack.