Do thermals stop rising when clouds are formed?
No, the opposite is in fact true. When the water condenses, it releases latent thermal energy, causing the air to rise even faster. That is why some glider pilots (who are appropriately licensed) fly, not just under, but into cumulus clouds to gain height.

When water vaporizes, it absorbs thermal energy. That is why, for example, humans sweat to cool down. As the sweat vaporizes, it removes thermal energy (heat) from the body. This thermal energy is stored in the water vapor, and will be released when it condenses.

The air in a thermal will only stop rising once it reaches the temperature of  the surrounding air, which can happen at different altitudes, depending on the state of the atmosphere. The main reason rising air cools down is because there is a relation between temperature and pressure. As the air rises higher, the pressure drops, and the temperature does the same. This can be depicted on a diagram of the temperature gradient, like this:


The thick red line is the ambient temperature of air at different levels. The oblique lines indicate the rate at which a column of rising air will cool down as it rises. As long as the thick red line is more inclined than the oblique lines, it is an indication that air will continue to rise, since it will not cool down fast enough to reach the temperature of the surrounding air.