WARNING: The following contains major spoilers from the Demon Slayer: Kimetsu no Yaiba manga, by Koyoharu Gotouge, available in English through VIZ Media.
After the events of Demon Slayer: Mugen Train, Akaza is public enemy number one for killing fan favorite Kyojuro Rengoku and then fleeing the scene. Upper-Rank Three of the Twelve Kizuki, Akaza's overwhelming power proved too much for the Flame Hashira. However, victory over Akaza is not impossible -- thanks to the Demon's careless flaunting of his own weakness that, unfortunately, our heroes failed to notice.
When Akaza opts to simply throw hands with a master swordsman, he appears invulnerable thanks to his instant regeneration and unusual techniques. As he toys with Rengoku, he begs the Hashira to become a Demon so they can fight forever. Rengoku utilizes every form of Flame Breathing yet fails to make any headway against the mighty Demon. However, the path to victory was right in front of him, if he had only paid closer attention to what Akaza was saying during their battle.
During Demon Slayer's Infinity Castle arc, Tanjiro and Giyu Tomioka encounter Akaza on their way to confront Muzan. Ultimately, history repeats itself as the two powerful Demon Slayers are still no match for Upper-Rank Three. Even though Tanjiro has mastered the Hinokami Kagura and Giyu has developed a Mark that immensely increases his strength, Akaza still overwhelms them. While Giyu battles on, Tanjiro stops to try to figure out how Akaza perfectly counters every move they make.
Tanjiro thinks back to his previous encounter with Akaza to try to find a clue to the Upper-Rank's fighting style. In Mugen Train, from Akaza's POV, it's established that he can actually see a person's fighting spirit. This isn't something Tanjiro or Rengoku would have known, but, one of the first things Akaza says is that Rengoku's fighting spirit has been raised close to the maximum. Using hindsight, Tanjiro realizes Akaza was speaking quite literally, and his use of the term "fighting spirit" was not meaningless.
Near the climax of the battle between Rengoku and Akaza, the Flame Hashira unleashes his ultimate technique, Flame Breathing, Ninth Form: Rengoku. As the attack approaches, Akaza's body is visibly vibrating as he exclaims his admiration for Rengoku's fighting spirit once again. Recalling this moment, Tanjiro also remembers a conversation with Inosuke in which the boar-head swordsman reveals he can feel a person's malicious intent on his skin. This brings Tanjiro to the conclusion that Akaza can sense a person's fighting spirit, which allows him to know his opponent's location and predict the moves they're about to make.
After a brutal hit from Akaza, Tanjiro manages to completely repress his fighting spirit, which causes Akaza to assume Tanjiro has died. As Akaza approaches Giyu to finish him off, he fails to realize Tanjiro is creeping up behind him, now that the protagonist has suppressed his fighting spirit. It turns out Akaza's dependence on his ability is his undoing, as he is completely helpless in combat against an emotionless Tanjiro and is quickly beheaded.
Tragically, Rengoku's death at the hands of Akaza was entirely avoidable. The Flame Hashira was so focused on his Techniques and protecting the others that he focused on overpowering the villain, which Mugen Train and the Infinity Castle arc established is impossible. To be fair, Tanjiro didn't figure this out during Mugen Train either, even though this encounter is the sole reason he's able to defeat Akaza later down the line. As is often the case in Demon Slayer, anyone who takes Demons at face value will end up as another tombstone on Ubuyashiki's morning walk.