iOS hide/show password issue

I have been working on the hide and show password feature and I am a bit stuck on the issue regarding this. Here is the code

<TextInput
mode=“flat”
error={false || loginError}
label=“Password”
clearTextOnFocus={false}
secureTextEntry={showPassword}
autoCompleteType=“password”
onChangeText={setPassword}
right={<TextInput.Icon onPress={()=> setShowPassword(!showPassword)} style={{top: 10}} name={showPassword ? “eye-off-outline” : “eye”} />}
value={password}
/>

The issue that the password resets to empty if you click on show password and then hide it again and type. Which after searching around a bit I found out that it’s something IOS has as a feature changing secureTextEntry to true will clear the text. Is there a work around for this, since it’s a widely used feature its hard to believe that there is no work around for this. It works completely fine on Android.