Great question! There is a sense in which the Barbara at the end of this play is more of a realist compared to her feelings and thinking at the beginning of the play, in particular through the way she thinks about the role of people such as her father and the way that their wealth and importance allows them to leave such indelible marks on the world. Note the following quote and how Barbara compares what she was like when she first joined the Salvation Army to what she is like now:
I was happy in the Salvation Army for a moment. I escaped from the world into a paradise of enthusiasm and prayer and soul saving; but the moment our money ran short, it all came back to Bodger: it was he who saved our people: he, and the Prince of Darkness, my papa. Undershaft and Bodger: their hands stretch everywhere: when we feed a starving fellow creature, it is with their bread, because there is no other bread; when we tend the sick, it is in the hospitals they endow; if we turn from the churches they build, we must kneel on the stones of the streets they pave. As long as that lasts, there is no getting away from them. Turning our backs on Bodger and Undershaft is turning our backs on life.
Barbara comes to understand that people like her father cannot be ignored, and that their influence cannot be escaped. In a sense, she realises that she cannot flee from such individuals, and her realism is based on the understanding that she has to make some sort of ammends with them in order to live in the world and help those around her. However, at the same time, there is still something of her original idealism present in her by the end of the play. Note her plans to take the housing her father gives to his workers and make it better for them. Barbara strikes us as a wiser, maturer individual who may have lost some of her youthful idealism but still clings on to the hope that the world can be made into a better place.