The Xiaomi Automatic Soap Dispenser 1S relies on placing your hand under the sensor to catch the foam. If your hand keeps shaking underneath or pulling up and down while catching the foam, the foam will be sensed a second or third time and will automatically run away. This is a normal phenomenon.
For your reference, here is more information about the device automatically dispenses foam after being exposed to liquid:
If water or liquid splashes onto or near the sensor window, the infrared sensor can falsely detect a hand. The sensor uses light reflection, and liquid can interfere with or simulate the presence of a hand.
A thin layer of water on the sensor surface can cause accidental activation. This can occur during cleaning or after being placed in a humid or wet environment.