What fruits keep their sweetness when baking?
You cannot simply replace sugar with fresh fruit in baking recipes.  Sugar is, well, 100% sugar.

Fruit is mostly water, on the order of 70-90% depending on the particular fruit in question.   The remainder is usually sugars, starches and pectins for the most part.

Any recipe not specifically designed to be sweetened with fruit is going to fail spectacularly if you try to substitute.   To do so, you would have to calculate the water weight in the added fruit and remove it form elsewhere in the recipe (if there is enough liquid elsewhere in the recipe to do so) at the very least.

Sugar is also extremely important to the structure and moisture retention of baked goods (with the notable exception of yeast raised breads), and simply substituting it out is going to have a deleterious effect on the texture.

Instead, you should search out recipes that are sweetened in a manner that meets whatever requirements you have.   Applesauce and cooked down pears, as well as bananas might be suitable, but it would depend on the specific application.



In any case, almost no sugar will be lost during baking; all fruits will retain essentially all of their sugar.

Except at the very edge of the baked good, where browning occurs (indicating caramelization and the Maillard reaction are taking place), the sugar will be unchanged by the baking process.   The amount of sugar lost to browning in the crust is vanishingly small.