@d6 what you’re doing is fine if you need both channels preserved.
Different people do different things here (l+r)*.5 is one sensible option and will preserve the level of correlated content in the left and right channels. This makes sense for most music. If the channels are not correlated, you will observe a level dip - but if you wanted to fix this, you would need a peak limiter (and clipping is one peak limiter) and that’s a whole other can of worms.