Currently, all references in Integrated contain the database name. In many cases, this name is different from the current database, because data has been migrated.
The $db is optional: https://docs.mongodb.com/manual/reference/database-references/#dbrefs
It is recommended not to use the $db field:
"For backwards compatibility storeAs=dbRefWithDb is the default, but storeAs=dbRef is the recommended setting."
Set storeAs=dbRef for all references currently using the default storeAs=dbRefWithDb
We expect this does not affect current installations, in case we are wrong the migration script will be a separate issue
There are 60 places in the code to change this.