If that were true, homonyms would be an intractable challenge to LLMs, yet they can handle them just fine, and do so in tasks that require understanding of their semantics (e.g. give LLM a long text and require it to catalog all uses of the word "right" segregated into buckets according to meaning).
How so? Syntactic pattern matching can distinguish "right" used as noun from "right" used as adjective. It cannot distinguish "right hand" from "right way", though - that's semantics. LLMs can reliably do the latter.