Strange bug - Some element are visible when I run app from XCode, but not if I start running the app from device - Swift

Context: Native iOS app developed with Swift which manages external control units via bluetooth. I use XCode Version 14.2, but it used to happen with older versions as well. Tested on devices with iOS 15 and 16. In a specific section what the app has to do is: take the data through the bluetooth input and output go to the outputs screen and present the outputs from the outputs screen go to the inputs screen and show them The problem is as follows. If I take a physical iphone and connect it to the mac, I start the app from xcode everything works fine. If, with the same iphone, I start the app not from xcode but with a tap from the iphone screen, the app starts correctly, connects via bluetooth, shows all the outputs correct, while for the inputs they are all correct except the 'last. The last one is never displayed, all the others are. The main problem is that I don't know how to debug since it only happens when the app starts unlinked from xcode. Does anyone know of other ways to troubleshoot the problem or have had similar problems and know of possible solutions?

Strange bug - Some element are visible when I run app from XCode, but not if I start running the app from device - Swift
 
 
Q