From the Apple documentation Encrypting Your App’s Files
Data protection is enabled automatically when the user sets an active passcode for the device.
However, there is a Capability that can be toggled on and add to the app's entitlements file, called "Data Protection" that under the description says
Data protection allows an app that accesses sensitive user data to use the built-in encryption available on some devices.
Is this capability just old legacy stuff, or do you actually need to enable it in order to get complete data protection?