By default LinkedIn trains it's AI models on your personal data - like most of the LLMs.
As stated in their terms, it trains on profile content, public posts & articles, comments and reactions but NOT private communications.
But, like the LLMs, we recommend turning it off, as you can have more confidence in data being secure.