Their filling is filled with gases.
The filling of dumplings consists of minced meat and onions. When heated, these ingredients release the air and gases contained within them, including carbon dioxide, and also produce steam when boiling. Most of these gases cannot escape and expand the filling, which leads to a decrease in its density. This is what makes dumplings capable of floating.
If the dumplings are cooled together with the broth, the gases dissolve, and the dumplings sink to the bottom. The dough shell also helps to retain the gases, although its role is not as critical: meatballs also rise to the surface when boiled.