It's not related to slug. It's related to the UID field in Prismic editor. This means that another document in your repository already has this UID value. It could be a document that is drafted or in the archive.
Please check our article to unlock the old UId: