This commit adds a call to dismissAllModals before setRoot to ensure this use case doesn't break in the future.