Ensure the original configuration is restored in with_isolated_config