The implementation may vary but, to my understanding, the basic idea is that the switch of the handle rotates a plunger (for lack of a better word), which connects the tire to either the pressure gauge or the air supply
figure: a generic schematic - only for illustration purposes.
The handle trigger is spring loaded so it returns to its position.
So what happens when you connect the pressure gauge, is that the tire gets connected with the pressure gauge and you read the pressure.
When you press the button, the rotation of the plunger/valve results into the external air pressure feed to be connected to the tire. This results in increasing the pressure in the tire.
When you release the handle, the plunger returns to its default position and the pressure is properly read again.
When the handle trigger is activated, after the momentary drop at the bottom, you can see that the pressure gauge sometimes reads a lower value. This may be due to leakage from the port, or how the ports are connected (again this may vary).