Theme / Styles don't always work when using a render texture ?

both configurations are nearly identical , the only difference is the targetTexture on Panel Settings , unity 2021.3.27f1

Changing render texture to have none zero depth buffer solve it

Yes we need a render texture with a depth buffer and a stencil available