dynamic created mesh with wrong render order

Hope someone will answer - i’ve created the following mesh with the vertices in the order i wrote
ive created triangles in that order so they are facing in the right order

0,4,1
1,4,5

1,5,2
2,5,6

3,7,2
2,7,6

i’ve then applied the uv 33% for each segment . which is also working nicely

i just can’t figure out why the floor (the red part is rendered above the yellow wall)

i think this is related to the UV map and not to the order of the triangles