Perhaps the AI should be a little less proactive in condemning the ships from a neutral power entering their system, unless it does something exploitative or spends too much time there, is a warship (based on their intelligence anyway) or whatever, maybe only if the ship has a transponder turned on will it be treated neutrally?
Certain actions should be detectable with sensors, geo and grav scans by passive sensors, unloading cargo and other stuff by active sensors, doing this in a claimed system would cause hostility, though you might get away with it if the claimant is out of range (the same can happen to you though). It should be possible to see what intelligence like this has been gathered on any particular ship, if not in the event log.
Also, maybe there should be a default order for creating system patrol vessels, which can hang around jump points or patrol between locations and will follow neutral vessels that have their transponder switched on, ping them with actives (if you want) while keeping at a specified range.
Oh. One last thing, even if ELINT isn't detectable, it would be pretty obvious that a ship hanging around not doing anything specifically is doing spying of some kind, though there's a problem with my proposed neutral allowance of vessels in your space, passive systems and even ELINT itself could just be crammed into every freighter you have passing through their space gathering useful intelligence.
I guess inspection boarding would be needed in this case, once again being something dependent on having the transponder switched on, which is a convenient way of declaring "this ship is civilian and I submit to all laws and customs while inside your space"
And therefore if a ship class is detected to be equipped with military systems, or maybe even carrying military systems, troops or whatever that would cause a diplomatic incident (the magnitude depending on how much stuff the ship is equipped with as well as your relations and general trustworthiness) and finally the mark that ship class as military and ban it from their systems.
Some races might be really lenient on offenses like this and let you get away with an incident every few years without serious damage to relations, whereas others might just close off their border to you completely.
There needs to be a little more flexability with neutrality rather than it just being a state between war and friendly, friendly just being neutral but with significantly more trust.