I am not sure I would agree that this only happens with dynamic modules built in module builder. We have a site that has been using the eCommerce module that previous to the upgrade to 9.1.6120.0 SE linked fine when adding document links to custom fields we added on product types of type LongText.
Since this update to 9.1 we are seeing that initially when selecting links from the document link manager that it correctly puts a href value and then a sfref[guid] value for the anchor tag. Next we publish the product and then immediately go back to edit and view the html to find out that the sfref has been stripped completely and the href value has been replaced with the sfref guid.
What is interesting is that this does not happen with the built-in description field which is also of type LongText, but is with the custom fields.
We're using Sitefinity 9.1 and I've encountered a similar situation when adding link to a document using the Document Manager via the radEditor in a custom module.
Adding document link through the Sitefinity Editor (feather?) when amending Page content works as expected and generates the correct url to the document.
Shall try the solution suggested and see if it helps :)