Links add via REST API aren't displayed correctly

Hi there,

I posted this first in the Forge area of the community, but didn’t get any answers. That is why I post it here again as it is also a more generic topic related to Confluence Cloud, and actually not limited to forge.
I tried to set certain links on a Confluence page via rest api in my forge app. This works fine if I set the links to display inline. However, when trying to insert display format card or embedCard, it looks like this for external links

and this for internal links to other Confluence pages

Bildschirmfoto 2021-12-29 um 17.10.48

Does anybody know what that means and how to fix it? When I update the content, the body looks exactly the same as when I read the page content. But the links are not displayed as cards correctly on the updated page.
Also the learn more link on the first screenshot doesn’t really help as it is pointing to this page:

Atlassian Support

Convert pages to the new editor | Confluence Cloud | Atlassian Support

Learn how to convert a Confluence Cloud page that uses the legacy editor to a page that uses the new editor.