Baya performed lifeguard duties in the Java Sea during the first half of July and then continued her patrols in that same area. On 16 July, she torpedoed and sank the Ōtori-class torpedo boat Kari, then en route from Surabaya to Ambon, with two torpedoes; two officers, 22 men, and one civilian passenger ultimately reached Masalamo Besar two days later. After an unsuccessful gun attack on another enemy patrol craft, the submarine received orders to Subic Bay on 26 July. She reached her destination five days later and moored alongside Anthedon (AS-24).