I’ve just pushed WP Discourse version 2.0.4 to the WordPress repo. It will handle the issue with posts that were unlinked from Discourse when a site was on a version of the plugin less than 2.0.3. For these posts, the first time you update the unlinked post you will see the Embed url has already been taken error message. After the initial update, you will no longer see the error message (or be sent the publishing error email.) It’s not a perfect solution, but it’s the best way to resolve that issue.
If you attempt to publish a post to Discourse when there is already a Discourse topic that is using its embed URL, you will get an error. If you delete the topic on Discourse that is using the embed URL, you should be able to republish the topic. It takes Discourse some time to delete the Topic Embed that is associated with the WordPress post. I still need to confirm what sets the time period for this. Let me know if you are still having trouble with this.
Ideally, when a WordPress post is unlinked from a Discourse topic, the embed_url that is associated with the post would be deleted on Discourse. Unfortunately, it is not currently possible to remove a topic’s embed_url through the Discourse API. It might be possible to get this to work in the future. A smaller change that would be helpful for the WP Discourse plugin would be to have Discourse return the topic_id when it returns the Embed url has already been taken error message. That way the WP Discourse plugin could let users know which topic on Discourse is causing the issue.