We can create a post with a message prefilled from the URL using the below way
https://www.linkedin.com/feed/?shareActive=true&text=Hii%20Hii%20@lavanya
but when we mention a person in the text, it won't auto-detect, again we need to click on that and select the person from the given list of people.
Is there any way to auto-detect the person that we trying to tag