It sounds like you are trying to achieve something similar to the Discourse “Reply as linked topic” functionality. Users can do that by selecting that option from the composer’s reply-options menu:
You could also achieve that by using the compose topic via URL method that you have linked to. To get that to work, you will need to urlencode the topic’s URL before adding it to the body section of the URL. For example, if you wanted to create a link that added this topic’s URL (https://meta.discourse.org/t/how-to-add-post-url-in-customize-url/176935) to the body of a new topic, you would need to urlencode it to https%3A%2F%2Fmeta.discourse.org%2Ft%2Fhow-to-add-post-url-in-customize-url%2F176935 before adding it to the URL’s body section.
If you use that method, you will probably find that you need to URL encode the other parts of the URL to remove any spaces in it’s title. Otherwise it will not create a clickable URL.
No, there is not a way to substitute a link into a post_url variable. Possibly something that did that could be developed as a theme component or a plugin.