Internal links in Rich text editor are being resolved through below processor inside the renderField
pipeline.
<renderField>
<processor type="Sitecore.Pipelines.RenderField.ExpandLinks, Sitecore.Kernel"/>
</renderField>
ItThis processor utilizes link provider ExpandDynamicLinks
method to transform the link inside rich text to the path format. You can check for the method overrides inside your custom provider for this method.
Hope this helps!!! Let me know in case you have any queries.