In UNO with card stacking rules, can you stack the opponents final card?
We have played with this house rule in our gaming group before and we resolved it in the same way we resolve MTG (Magic the Gathering) chains and that is the action must resolve upon the final valid play. So, if you are playing with the chain draw 2 house rule, in your scenario where there are two players remaining, the player who is unable to add another draw 2 into the chain is the one who gets stuck drawing as many cards as are in the stack.

If this results in one of the two players going out, that player wins. Otherwise, they draw more cards and the game continues.

The "As soon as one player goes out" rule as it was originally written for Uno did not take into effect this "chain stacking" house rule. In order to be the most correct, it must be interpreted to mean "As soon as one player goes out at the end of a play". In this case, the draw 2 chain is considered a single play as the draw 2 chain only stops (resolves) on the player that cannot place a draw 2 on the stack.

As a final note, we ultimately did away with Chain draw 2 combinations because of this exact argument we would have every time a new player arrived. If two players remain, player one has 5 cards, player two has 2 cards, player two gives player one a Draw 2, then player one draws 2 cards, then plays a Draw 2 back on Player two. No stacking or chaining is in effect, so Player two now has 3 cards and Player one has 6, and the game continues.