If the origin is changing then from my understanding your storage resets so that is the reason. Not sure why you have https with Capacitor. By default, it is http.
Yes, the default value in code is http, but all Capacitor 5 apps are created with the androidScheme set to https in the config file so they use https even if it’s not the native default.
Was done that way to avoid data loss going from Capacitor 4 to Capacitor 5 and give extra time to switch to https or manually set it to http if users want to avoid data loss when updating to Capacitor 6.