CIDetector is always nil on macCatalyst (on iOS it works)

let ciDetector = CIDetector(ofType: CIDetectorTypeRectangle, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyHigh])

The code worked for 2 years on macCatalyst. After the Big Sur update it stopped working and now always return nil.
On iOS it is always working as expected.

If I use CIDetectorTypeText instead, it won't be nil. I suspect Apple broke the CIDetectorTypeRectangle on Big Sur