If an alien race suffers damage from one of your ships that it can't see (lasers/missiles from outside of detection range), do you still suffer the relationship hit?
I.e. is privateering a thing?
Realistically I think you should suffer full relationship hit.
It would be fairly trivial for anyone smart enough for space travel to figure out who attacked you based on attack patterns, explosion signatures, analysis of wreck/ship damage, monitoring of jump point traffic and using logic/exclusion of who could have committed the attack. Even if they can't prove it being 95-99% sure you did it would be almost the same as having proof relationship wise.
There might be some edge cases like if you can emulate the attack originating from someone else or make it looked like a rogue vessel of the own forces did it, but these are one time and edge cases enough that just having SM options available to either disable relationship changes or resetting them back should be plenty enough.