I know the Barb once while in the Sea of Okhotsk did almost attack a Soviet vessel. they where in theroy neutral with Japan but by this time in 1945 I am sure they were gearing up for thier attack in Aug.45. their was an agreement that soviet ships would not enter Jap waters and that where to sail with decks light at night so as not to be attacked by US or Jap subs but the one the Barb saw was in Jap waters and did not have lights on and in real life we had to be very careful as the USSR was already our "Frienemy" by this point. And you can still spot other allied ships in the rapidly shrinking Jap areas so you do have to be careful as you will get a renown ding for sinking anything allied or neutral.
On one patrol in late 44 of off Formosa out of Fremantle I sailed back via the Molukka,Banda,and Timor seas(sometime in 43 there is a tender at Pulau Ternate) and I found a mixture of single allied and Jap ships one time in heavy fog I was all ready to fire and something threw me on the flag so I waited just a little longer it was Dutch. Now this same route up to mid 43 would be laden with Japs only but by mid 44 you cant be sure.Same goes for the first few months of the war as well.You had to sure of what you are about to attack in "Take Her Deep" they were all set up on a single ship when they saw that it had the green stripe and green cross a hosptail ship and they disengaged.( I know the Japanese did not always "play" fair but we did most of the time also you cant be certain whom was aborad that ship could have been civilans or POWs and if you get in the same mud as the bad guy dose then you and he are the same there are documented cases of Japanese that had even refused rescuse by our subs that got plucked out anyway later thanking the guys years later one Japanese man even just showed up unannounced at the sub that he was a guest ofs reunion to thank the sailors in person )