If an external link is added to a sharing message for LinkedIn and the link is the last part of the whole message, LinkedIn will automatically remove this. However, you can include a link in the sharing message if you add the link within the message and make sure that it is not the last part of the message.
Example 1: the link will be removed by LinkedIn:
Example 2: the link will not be removed by LinkedIn: