This is an ongoing problem for a long time, The only save is for sci captains that can hit some of their abilities to decloak when it happens, unfortunately tacticals, and engineers don't have any that I have found so far to decloak the ship. If you fly close to the opponents some of their abilities will also decloak you.