So I tried this just now and it didn't help.
I had Cocoon version set to 'latest'. So first I tried setting this to specifically say: 2.1.0
Doing that added the following line to my config:
<preference name="cocoon-version" value="2.1.0"/>
That line was not present in my config.xml previously so I thought it might have helped. But on compiling the game and testing on my Apple test device, the problem persists: localstorage data is lost on closing the app.
I tried the same thing with Cocoon version set to 2.0.0, compiled and tested the game, again with the same result.
I really need some input on this from the Cocoon devs please? @Blue_Sialia @imanolm1