The worldborder always renders behind clouds, even if those clouds are behind the world border.
MC-167278 World border renders behind clouds and the sun
MC-168601 Clouds render in front of world border
MC-9553 Wrong rendering order of particles, hitboxes, clouds, transparent blocks, breaking animations and various other transparent textures
MC-162340 World border is rendered behind transparent blocks
MC-164712 Clouds are rendered in front of chunk borders