Unfortunately, if you run this code on iOS 17 and present sheet several times, you can see with Debug Memory Graph that leaks happen (for example, you open sheet 4 times – there are 4 Swift closure context leaks). And this issue doesn't happen on iOS 16, so the root of problem must lie somewhere deeper.