Basically the feature looks very unstable. The app we are developing is a little complicated one. I tried this same code to make a sample simple app. The adjusting focus is working perfectly. Weirdly, after running the sample app in my iPhone15, if I run our main app, which is a totally different app, focus adjustment starts working perfectly in the main app too. But once we make some change like updating iOS version, the focus adjustment in the main app stops working. But again, if we install and run the sample app, The main app starts to work perfectly.
But the sample app is totally isolated from the main app. And the code to adjust focus is the same in both apps!