When Lockdown mode is enabled, LDMGlobalEnabled default is set in NSGlobalDomain. You can query this with
let isLockdownModeEnabled = (UserDefaults.standard.object(forKey: "LDMGlobalEnabled") as? Bool) ?? false
Ref : https://stackoverflow.com/questions/72956425/is-there-any-public-api-to-detect-lockdown-mode-in-ios-16beta-3#