Atlas didn't update a new version of a schema and had to destroy the collection to fix it

I modified a schema in Node and mongoose kept referencing a prior version of the schema. I restarted VS code multiple times and deleted dist/node_modules etc and reebuilt it but it still wouldn’t work.

The error was a duplicate key error with a required unique field (email) being populated with a null value. But after fixing that mongoose kept referencing this as the error and I had to nuke the collection (I even logged out of Atlas, logged out of my computer and restarted it all). It’s just a test collection but can someone tell me how to force Atlas to update? or was MongoDB having issues yesterday? (a Sunday). It’s very frustrating when you’re sure you’ve fixed something but your database is stuck in the past! Yes I’m on a free tier shared cluster.