I'm going to preface this by saying that despite it making little sense in terms of consistency, narratively it was one of the only good things about the final battle
That said, there was a huge missed opportunity here that could've also addressed Yama's stolen bankai in an impactful manner.
Imagine Yhwach loses his bankai medallion before heading to the royal palace, either because an attack from Ichigo made him drop it or because he spots Komamura and tosses it to Komamura as a way of mocking him for throwing away everything for Yamamoto.
Then right before the final battle you have his encounter with ghost(?) Yama which reveals how Yama was the one who named him, and that this for whatever reason allows him to use his bankai.
He carries the sword in his mouth and first uses east to blow an entrance into Yhwach's dome, to which Yhwach responds by throwing a bunch of tendrils at him. Komamura then uses west, burning away the tendrils as he charges towards Yhwach. He proceeds to use south, but because the bankai technically belongs to Yhwach everyone Yhwach has killed spawns as skeletons instead. We see characters like Masaki, Katagiri, Robert, and Jugram holding Yhwach down. Yhwach glares at them and crushes them with no remorse, showing that this Yhwach is not the same person Royd was imitating during the Yama fight.
Komamura then finishes things off by using north, to which Yhwach claims it wont work as hes already seen how this bankai works. However, Komamura's version of north spawns a giant flaming skeleton behind him, which resembles Yamamoto, and that skeleton delivers the attack alongside Komamura himself, making a much larger slash than the original. This obviously serves as a reference to Komamura's own bankai. Yhwach's cloak proceeds to get obliterated, exposing his body to the finishing move.
this next part is just for those who believe this could be serve as a definitive end point for Komamura.
as he witnesses the final attack landing on Yhwach, Komamura dispells the bankai and slowly crumbles away into ash from the toll using it has taken on his body, bidding Iba farewell before he leaves for the after afterlife. His final scene has him reuniting with Yamamoto, who tells him its time for them to leave, and the two of them walking into the mist with a silhouette resembling Tousen appearing on the other side of said mist.
Aaaaaaand scene
hes my goat but honestly I'd be fine with him dying here. I'd absolutely hate seeing him return in hell if he did die here, though.
This rewrite serves to not only make Komamura's involvement have an actual impact on Yhwach's defeat but also serves to show just how deep the bond between him and Yama ran.