Perfect Clear is a feature that automatically removes all remaining tiles when all tiles are in an active state (i.e., touchable) and the number of remaining tiles is between 10 and 30.

To turn off Perfect Clear

Tap the Settings button (gear icon) at the bottom left corner of the play screen.
In the settings popup, find the Perfect Clear option.
Switch it to Off, and the Perfect Clear will no longer activate.

Perfect Clear is enabled (On) by default and can be turned off manually if preferred.