I don't think there's any extension ready to use for this, but this can be implemented using a custom discussion slug driver which would just return an empty string all the time.
To only change this on specific discussions, there was this extension but it has not been updated https://discuss.flarum.org/d/25993-manual-discussion-slug