You can try to set up a NN where some of the neurons are either only activated off of 'safe' input (directly or indirectly from other 'safe' neurons), but as some point the information from them will have to flow over into the main output neurons which are also activating off unsafe user input. Where the information combines is there the user's input can corrupt whatever info comes from the safe input. There are plenty of attempts to make it less likely, but at the point of combining, there is a mixing of sources that can't fully be separated. It isn't that these don't help, but that they can't guarantee safety.
Then again, ever since the first von Neumann machine mixed data and instructions, we were never able to again guarantee safely splitting them. Is there any computer connected to the internet that is truly unhackable?