Re: My question is, is there a way to permanently turn off that Depth Effect altogether?
Wondering if you have tried restarting your iPad Air (deletes temporary files, re-establishes connections, may update recnt setting changes, and often restores order if something is not working as expected. )
Else: Seems we would need to determine the cause of the situation in order to come up with a permanent "fix".
Eg:
If some of the photos were taken using depth effect settings, turning off depth effect would not be permanent.
(You might want to experiment with other photos you know for sure have no depth effect?)
or
If there's a software "bug' in that iPadOS version: updating to the newest iOS 17 version may help:
Eg: There have been 5 updates (bug-fixes / security updates) since iPadOS 17.5.1, with the latest being iOS 17.7.2 More info: About iOS 17 Updates - Apple Support
Alternatively, upgrading to iOS 18 (if compatible with your iPad Air version) may help:
Reminder: If updating, or upgrading, it is always wise to back up iPad data first.