Mongo E11000 duplicate key error collection after mongo 3.4 to 3.6 upgrade
First, per the documentation you should always upgrade the Secondaries first, finishing with the primary node as per MongoDB upgrade process.

Second, since 3.6.13, MongoDB added a field userId adding a UUID into any user created to avoid _id collision such as what you seem to have encountered. See https://jira.mongodb.org/browse/SERVER-38984.