I have the same problem
Launching lib/main.dart on iPhone 15 Pro Max in debug mode...
Running pod install... 17.4s
Running Xcode build...
Xcode build done. 40.9s
Failed to build iOS app
Error (Xcode): no such file or directory: '/Users/rensithudaragonalagoda/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation'
Error (Xcode): stat cache file '/Users/rensithudaragonalagoda/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.0-22A3362-db63dc9361471f152f572502bdbfe70a.sdkstatcache' not found
Could not build the application for the simulator. Error launching application on iPhone 15 Pro Max.