@DTS Engineer I can confirm that I can reproduce the problem on my side using your exact same code - which is pretty similar to mine - and using a local http server on my Mac computer.
It worked well the first time, then I deleted the app and installed again and did the exact same steps and the issue is reproducible. The only way to fix it is to restart my device. I am on iOS 18.1.
Then I tried the same code on an iOS 16 device, I tried the same steps deleting the app three times and I was not able to reproduce the bug on that device.
I appreciate your help,
Thanks