In here https://github.com/firebase/firebase-js-sdk/issues/8889#issuecomment-2816276364 mentions, that sometime you have to define the database name defined as the second parameter so instead of:
getFirestore(app)
Do this:
getFirestore(app,'dbName')