What you encounter is the expected behavior. There are some cases, such as yours where the getCurrentUser() method will return a non-null FirebaseUser object, but that doesn't mean that the underlying token is still valid. This typically happens, for example, if the user deletes the FirebaseUser on a device and the local token on the other devices has not been refreshed. This is exactly what you are experiencing. In this case, you'll get a valid FirebaseUser object, but subsequent calls to authenticated resources, such as attempts to refresh the token, will fail since the token is not valid anymore.
To overcome this situation, I recommend you read my answer from the following post:
Furthermore, if you delete a FirebaseUser using:
mAuth.currentUser?.delete()
There is no need to call:
mAuth.signOut()
Because delete() method:
Deletes the user record from your Firebase project's database. If the operation is successful, the user will be signed out.