Cockpit url is being stripped from asset in WYSIWYG field

When placing an asset in the WYSIWYG field the cockpit url is being stripped from the image, only keeping the relative part.
Because its used as a cms the frontend has a different url and thus the image is not being displayed.

Is there a way to prevent this?