public static function shouldRestoreToRoot($record)
    {
        // If the record had a parent and that no longer exists in draft then yes
        if ($record->hasExtension(Hierarchy::class) && $record->ParentID != false) {
            return $record->getParent() === null;
        }

        // Otherwise it should be restored normally
        return false;
    }