OTL, Kingdom of Bohai was the last diplomatic partner of Japan after Japan had broken off diplomatic relations with Silla (780s) and China (830s).
What would happen if, after Khitan attack on Bohai (926), Japan sends a bunch of samurai to protect a rump Bohai on the coastal area?
Balhae collapsed IOTL due to a series of eruptions on Baekdu Mountain for around a century, which cumulated in a particularly devastating one shortly before the country imploded in 926 and was conquered by the Khitan in that year. The eastern regions would have been the most affected by the collective eruptions, which is supported by the fact that Later Balhae (c. 926-38), if it even existed at all, was probably located along the eastern coastline and was fraught with severe political turmoil before it collapsed, not to mention that none of its neighbors were willing to send aid. On the other hand, Jeong-an (c. 938-86) was founded on the north bank of the Yalu River, and repeatedly requested aid from the Song, instead of from Japan, along with sending a missive to Goryeo shortly before it was also eventually overwhelmed by the Khitan after repeated invasions.
As a result, Japan would have to either attack the Khitan directly or sail around the Korean Peninsula in order to even reach any Balhae remnants, both of which would have been extremely risky, not to mention that the Battle of Baekgang several centuries earlier would have provided a cautionary tale. The fact that neither the Song nor Goryeo sent any aid by land or sea for decades also indicates that they were also unwilling to incur significant risk, as they were more focused on defensive measures or campaigns elsewhere.
While uprisings in Manchuria continued to occur into 1116, they all failed to last beyond a year, and were much more limited in scope.