One channel, two kinds of content
The root problem is architectural rather than a training deficiency.
A language model receives a single stream of tokens. Inside that stream are things meant as instructions, your system prompt, and things meant as data, the user's question, a retrieved document, a tool result, a web page. The model has no reliable mechanism for telling them apart, because they arrive through the same channel in the same representation.
Compare that with a database. SQL injection was solved by parameterised queries: the query structure travels through one channel and the values through another, so a value can never become syntax. There is no equivalent for prompts. Everything is text, and text that looks like an instruction can act like one.
So instruction-following, the property that makes these models useful, is the same property an attacker exploits. You cannot train it away without destroying the capability.
That is why guardrails are external. The defence has to sit outside the model, because the model cannot be relied upon to police a distinction its architecture does not represent.

