Is it harmful to shift RD while climbing standing?
Will you damage components?

Probably, if this is a repeated pattern, yes.

When standing to climb you will be in a higher gear than when seated climbing. This means the cadence of your legs and pedals is slower. Add to the slower cadence the fact that you are powering down hard to accelerate uphill and there is significant power going through the chain and derailleur over a chain moving too slowly. If you are hearing loud clunks, that is unlikely to be good for your bike's components. It may not result in immediate failure, but is increasing wear and could result in failure later on. Rather than chain stretch, you may get a link failure and chain snapping, or you may damage parts of the derailleur if you do this regularly under high power.

An alternative approach to changing gear while standing

Once you have got the bike moving at a speed where you feel the cadence is too quick standing, try going back to a seated position. It will probably now feel too slow to change up. This will also allow you to use different muscles. If you can still accelerate up to a speed where the cadence is too fast and you want to change up, then do so with the pedals spinning quickly but with a moment where you apply slightly less power.

General advice on hill climbing

As you change up, move to standing to maintain momentum and to account for the lower cadence of the higher gear. If you can still accelerate in the higher gear - repeat.

You may also find this article on How to Climb a Hill on a Bicycle a useful reference. Although he concentrates on maintaining momentum and the theory of when to attack to optimise energy efficiency through the hills rather than how to change gears..