If you look at the message that comes up when you withdraw a message, it says it will be automatically deleted after 1 hour unless it’s been flagged. Perhaps that’s why.
I’ll be honest I’m not fully aware of exactly when it does and doesn’t apply - but I would suspect it’s related to that rather than a Discourse bug failing to remove posts. I suppose only DET can confirm either way.
If a post is flagged it’s not deleted after being withdrawn. Alternatively, a forum staff member (DET) can manually pause the deletion. I doubt it’s a bug.
If a topic was withdrawn by the user it probably broke the rules as is, increasing the likelihood of it being flagged.
People just flag posts for the sake of it sometimes. I’ve had posts I’ve withdrawn (that aren’t breaking any rules, just withdrawn because of a factual error/whatever) less than a minute after posting which were flagged.