Recently (June 14th), our Atlas connectivity tests started failing because convertShardKeyToHashed() could not run successfully on Atlas after the cluster was upgraded to 5.0. This turned out to be a permissions issue – our test user had dbAdminAnyDatabase@admin and readWriteAnyDatabase@admin access, which was insufficient for querying the admin.system.version collection. For now, the user has the atlasAdmin role, which circumvents this issue.
(Clusters > 6.0 should not be affected because those support native $documents)