On this page of the Cyberpunk 2077 game guide, you will find a description of an important choice you will have to make in the Search and Destroy quest.
After the action in Japantown, Takemura takes Hanako to a hiding place on Vine Street to find her father's murderer and clear herself of the charges. During the conversation, the Arasaki assault squad comes into the apartment to save the emperor's daughter. The main objective of the mission is to get out of the collapsed building, but then you can make an important story decision and try to save Takemura (it will not be displayed on the screen immediately).
If you do not save Takemura at this point, he will not participate in the further story of Cyberpunk 2077 and thus will not appear in one of the final scenes.