Koguryŏ and Paekche could easily have survived 660-668. Emperor Gaozong wanted to withdraw from Paekche after the Poksin/Toch'im revolt. In Gaozong's reign, besides the fight with Koguryŏ and Paekche, the Tang also fought the Khitan, Xi, Tiele, Helu, Shijie, Bayegu, Pugu, Tongluo, Kucha, Tujue, Tufan, Chuyue, and Gongyue (Almaliq?), while suppressing revolts in Guizhou, Jiangsu, Zhejiang, Guangdong, Yunnan and Guangxi. In a broader context of Tang foreign policy, Paekche is very, very, very low on the Tang list of priorities. Alliance with Silla aside, it's more likely that the Tang will decide to deal with one of these many other foreign enemies and leave the Korean Peninsula alone. And that means little help will get to Silla, and that means the Korean Peninsula continues its division. It's really a perfect time for Koguryŏ and Paekche to work together, at least until Yŏn Kaesomun's successors begin any possible period of feuding. The formation of a Japan/Paekche/Koguryŏ alliance seems quite likely to me, but it would be a short-lived alliance that will still buy Koguryŏ and Paekche a considerable amount of time.
I certainly agree, as the Tang was forced to withdraw north of Pyongyang, as it was overextended logistically, soon after the war from 670-6 had been concluded, due to the fact that the Silla-Tang alliance fell apart due to Goguryeo's collapse, and Silla managed to drum up resistance from former Goguryeo and Baekje soldiers as well. In addition, Balhae (initially under a coalition of disparate tribes that had been displaced by the Tang) managed to recover most of Goguryeo's former possessions by a decade or so after 698 because it managed to take advantage of a revolt by the Khitan shortly before then. If the Baekje-Japan alliance did win the Battle of Baekgang, some Japanese troops would have temporarily maintained a presence, while Goguryeo would have immediately sought an alliance in order to constrain Silla, although infighting would have quickly resumed after the Tang decided to direct operations elsewhere, as Baekje would have been wary of Goguryeo's undue influence, while Goguryeo would have been unwilling to ally with Silla, given the tumultuous events before 660. As a result, Baekje would probably have occasionally switched alliances between Goguryeo and Silla, depending on the situation.
It's also worth noting that Uija was probably not as depraved to the extent portrayed in later sources, as accounts such as the "3,000 Court Ladies" have not been thoroughly substantiated, not to mention that recent calculations suggest that such a feat would have been virtually impossible. In addition, the Baekje soldiers in question under Gyebaek had been highly trained and willing to fight to the end, as they successfully repulsed five waves from Silla during the Battle of Hwangsanbeol despite being outnumbered by 10:1, as they had been inspired by the commander's historical allusion to Goujian of Yue's resounding victory over Wu forces, despite similar conditions. It was not until a
hwarang was executed by Gyebaek in an act of mercy that Kim Yu-shin was finally able to break through in revenge, which has led some scholars to surmise that the Baekje force was annihilated not due to the final assault by Silla, but due to Tang reinforcements that were later covered up, as the soldiers from Silla had been highly inexperienced. The account of Gyebaek killing his family before heading off to battle has also been called into question, as the details suggest that the court had thoroughly considered all of the possibilities before deciding on Hwangsanbeol, as it was the most suitable to defend, so it would have made no sense for Gyebaek to predict that he would have lost the upcoming battle.
In other words, while Baekje could have managed to retain a presence on the peninsula soon after scoring a decisive victory in either Hwangsanbeol or Baekgang, which would have weakened the Tang's resolve, it would have been preoccupied with events on the peninsula rather than attempting closer relations with Japan. While the Tang's earlier withdrawal might have prevented the relationship among Yeon Gaesomun's sons from deteriorating to the extent as had occurred IOTL, political tensions would have continued to simmer due to the military dictatorship, which was only the second in 500 years. Although the continuing division might have bought enough time for both Baekje and Goguryeo, the former would also have been sidelined over the long run due to its fragile geographic position, while Goguryeo and Silla would have attempted to win Baekje over as well.
EDIT: I did some research, and Uija managed to seize 40 southwestern fortresses from Silla in 642, taking over most of what had been Gaya, and managed to pressure its eastern neighbor from two fronts after conducting an alliance with Goguryeo in the following year. Seven fortresses then passed to Silla control and back to Baekje by 645, and when Silla began to negotiate with the Tang in 649, Baekje responded by sending envoys to China in 651, although after the Tang requested Baekje to return its newly obtained possessions back to Silla, it decided to sever all ties with China in the following year. However, this led to strengthened ties with with Goguryeo, and negotiations were conducted soon after with Japan in 653, allowing Baekje to seize another 33 northern fortresses from Silla in 655. It also successfully defended an assault in 659, forcing Silla to request military aid from the Tang soon after in order to avoid losing to Baekje altogether. After 655, though, Uija seems to have withdrawn interest in military affairs in order to focus on his palace, and although specific details remain unclear, it is certain that his sudden change in attitude allowed Silla to regain the initiative, ultimately resulting in his downfall.
As a result, while Baekje might have been able to continue pressuring Silla with the help of Goguryeo and Japan if events had occurred differently around 660-3, Silla would probably have continued to exist as long as it retained a hold on the Han River valley, as Baekje's position had become extremely untenable soon after the Silla-Tang alliance.