When starting app (first time) while device is offline black screen shows

I am building an app (Ionic 5 capacitor) that needs to have offline capabilities.
At the moment with an archived ipa, when I start it for the first time (or after a force quit) when the device is offline (iphone), the app starts up but shows a black screen, similar to the black screen you see when you are debugging on a device and the app starts up (but then you see the ip-address and url it tries to connect to)

I do not understand why this happens and would be grateful to get some insight into why this is happening

How are you handling the network request? If the app makes a network request and then gets some kind of error, your code needs to handle that.

In my app I handle this by using the Capacitor Network Plugin to detect whether the network connection is active or not.