This is currently the designed behavior for UBB.threads.
The alternative is including punctuation at the end of URLs, such as in this fake demonstration:
https://www.ubbcentral.com/boards/showflat.php/Cat/0/Number/40841.That's the behavior in UBB.classic.
Neither is really right. I have tried and failed many times to create a regex that will grab a URL with punctuation in it, but then exclude any at the very, very end...