Why are the custom user data only matched by the string type _id?

I set the User._id to bsonType: objectId in the User scheme. But when I registered the user using this Realm.App.logIn (realm-sdks/js/latest/Realm.App.html#logIn). I did not get the customData. But when I changed _id to string type. I started getting the customData.

Every document in the custom user data collection should have a field
that maps it to a specific application user. The field must be present
in every document that maps to a user and contain the user’s ID as a
string.

And my question is: Where can I change to check matching type from string to objectId? And if I cannot do it. Why the developers used string type for matching? Because string representation for object id is not optimised solution. (mongodb - The only difference between an ObjectID and the string version is that it's smaller? - Stack Overflow)