I was going to recommend 301ing the old URL to the new one when it's changed. But this does lead to the potential issue of if it's changed more than once, you'd have multiple 301 redirects (this is an issue because Bing won't follow anymore than 2 redirects. Google is slightly more lenient, but not by much.) A possible idea that would need discussion would be that the system just looks at the TID, rather than straight 404ing due to an incorrect topic title.
URL was changed to
NodeBB detects the 404. So checks for a 200 OK on
https://community.nodebb.org/topic/2647/ (a valid link that adds the correct topic title to the URL automatically).
Not even sure if that's possible, but it was one of those late night thought processes that could be tweaked to come up with an amicable solution. While I was testing this, I found a minor bug, so will throw that on github.