The database (firebase) is often reset

I use the firebase database and often it is reset.
So I have a few questions
How can I set up a database that can not be reset?
And why does it even reset?

probably your issue is that after about 1 hour you cannot write data to firebase as you did after sign up
you need to refresh the token to be able to write again, i did not figured out yet how to do it correctly but you can use sign in method to get new token as mentioned here:

But I do not change the token

you should because token has short time life and you need to renew it when it expired (see refresh token block in link above) or perform sign in action again when you enter the app

All right, I think I understood