Try using the cheat "omni" if you have cheats enabled. See if there's a missing warp point or something of that nature that would disconnect your empires.
I would call the fact that your ship is in their system and the lost contact message popping up is buggish and it'd be worthwhile to send your save game to Aaron. Let him know if you are using a custom shipset and which mod version etc.
I tried the omni cheat. No dice. It's not so much that I'm losing contact as they are moving past me and I can't attack them. And no, I don't have a treaty with them. Random events are set to low occurrence and severity.
The reason why you can't attack is because there ships are unknown, but I can't come up with any ideas why they would be unknown if you have direct sight of them. It might be worthwhile to forward the savegame to MM, just let him know which version of the mod you are using and if you were using any custom shipsets etc. It has to be some sort of bug.