Delete user from database programmatically

Hello,
I want to give my users the possibility to delete their accounts on my Android app, but I can’t find any function for that. I found this in docs: https://www.mongodb.com/docs/realm/sdk/node/examples/create-delete-users/#delete-a-user

But these docs are for Node SDK. I found a similar page for Web SDK and Swift SDK, but not for Android. I tried to use app.removeUser(), it just logs out but does not delete the account from the database, is it a bug or it should work like that? Does anyone know how to delete a user from the Android app?