However, when that URL has an _ underscore character at the end, the underscore is ignored and not made part of the URL, so the above example would create a link that is https://example.com/path/1235 instead of https://example.com/path/1235_
More than likely this is a bug with GitHub Markdown and not specifically Retool - the underscore symbol is used to format text so it probably confuses the parser which is looking for a matching underscore before the text.
As a solution, if you specify it in full Markdown then it works: e.g. [link text](https://example.com/path/1235_)