Question about Dex and Heist Ending (Spoiler)

I just played the heist. I chose to tell Dex I did not have the chip. But I watched a video afterwards of the alternate outcome (saying you have the chip) and it’s exactly the same result. That’s lame, but understandable.

What I don’t understand is… why Dex doesn’t take the chip out of my head? Why did he leave it in? Why would he throw my body in the trash, without taking the chip first? Especially if you tell him you have the chip.

Of course if he took the chip, I’d be dead dead. The game would be over. The writing makes no sense to me. Am I missing something?