The trick is simply waiting for the CO2 to be released ahead of time.
For a full and cold soda this trick will not work, the pressure in the head-space will be slightly lower due to the lower temperature and with less total volume of CO2 -which makes the "pop" part of the trick fail- and the CO2 initialization points within the solution will be distributed -which causes the fizzing and overflow of liquid.
With a half filled soda that's been sitting out in a comfortably warm room, the soda is warmer. This means that you are working with a (even more) super saturated solution of CO2 in water and acid. This additional instability combined with a greater head-space for pressurization allows a greater build-up of CO2 in the bottle allowing for the "pop". If you didn't wait for the bubbles to go away you would still have fizz formation (and even flatter soda). If you did wait for the bubbles to disappear but you opened the bottle slowly, the soda would still be just as flat as with the pop-trick but with a slight hissing sound and limited additional bubble formation.